@@ -1010,7 +1010,6 @@ impl Renderer {
10101010 }
10111011 }
10121012
1013- let t_after_graphics = std:: time:: Instant :: now ( ) ;
10141013 // Now set up rendering - borrow comp and caches
10151014 let comp = & mut self . comp ;
10161015 let caches = ( & mut self . images , & mut self . glyphs ) ;
@@ -1050,13 +1049,6 @@ impl Renderer {
10501049 let take_count = selected_lines
10511050 . map_or ( lines_to_process. len ( ) , |range| range. end - range. start ) ;
10521051
1053- let t_lines_start = std:: time:: Instant :: now ( ) ;
1054- let mut perf_cache_lookup_ns: u64 = 0 ;
1055- let mut perf_draw_run_ns: u64 = 0 ;
1056- let mut perf_glyph_build_ns: u64 = 0 ;
1057- let mut perf_empty_runs: u32 = 0 ;
1058- let mut perf_text_runs: u32 = 0 ;
1059-
10601052 for ( _line_idx, line) in lines_to_process
10611053 . iter ( )
10621054 . enumerate ( )
@@ -1093,7 +1085,6 @@ impl Renderer {
10931085 // Fast path: empty run (blanks/spaces) — just advance
10941086 // and optionally paint background/cursor
10951087 if run. glyphs . is_empty ( ) {
1096- perf_empty_runs += 1 ;
10971088 let advance = cell_width * char_width;
10981089 let run_x = px;
10991090 px += advance;
@@ -1136,26 +1127,22 @@ impl Renderer {
11361127 continue ;
11371128 }
11381129
1139- perf_text_runs += 1 ;
11401130 let font = run. span . font_id ;
11411131 let run_x = px;
11421132
11431133 // Use pre-computed cache key — no String allocation needed
1144- let t1 = std:: time:: Instant :: now ( ) ;
11451134 let cached_result = if run. cache_key != 0 {
11461135 self . text_run_manager . get_cached_data_by_key ( run. cache_key )
11471136 } else {
11481137 CacheResult :: Miss
11491138 } ;
1150- perf_cache_lookup_ns += t1. elapsed ( ) . as_nanos ( ) as u64 ;
11511139
11521140 match cached_result {
11531141 CacheResult :: Hit {
11541142 glyphs : cached_glyphs,
11551143 ..
11561144 } => {
11571145 // Use cached glyph data but need to render
1158- let tg = std:: time:: Instant :: now ( ) ;
11591146 glyphs. clear ( ) ;
11601147 for shaped_glyph in cached_glyphs. iter ( ) {
11611148 let x = px;
@@ -1173,7 +1160,6 @@ impl Renderer {
11731160 y,
11741161 } ) ;
11751162 }
1176- perf_glyph_build_ns += tg. elapsed ( ) . as_nanos ( ) as u64 ;
11771163
11781164 // Render using cached glyph data
11791165 let style = TextRunStyle {
@@ -1218,7 +1204,6 @@ impl Renderer {
12181204 ) ;
12191205 }
12201206
1221- let td = std:: time:: Instant :: now ( ) ;
12221207 comp. draw_run (
12231208 & mut session,
12241209 Rect :: new ( run_x, py, px - run_x, 1. ) ,
@@ -1227,7 +1212,6 @@ impl Renderer {
12271212 & glyphs,
12281213 order,
12291214 ) ;
1230- perf_draw_run_ns += td. elapsed ( ) . as_nanos ( ) as u64 ;
12311215 }
12321216 CacheResult :: Miss => {
12331217 // No cached data - need to shape and render from scratch
@@ -1316,7 +1300,6 @@ impl Renderer {
13161300 ) ;
13171301 }
13181302
1319- let td = std:: time:: Instant :: now ( ) ;
13201303 comp. draw_run (
13211304 & mut session,
13221305 Rect :: new ( run_x, py, px - run_x, 1. ) ,
@@ -1325,7 +1308,6 @@ impl Renderer {
13251308 & glyphs,
13261309 order,
13271310 ) ;
1328- perf_draw_run_ns += td. elapsed ( ) . as_nanos ( ) as u64 ;
13291311 }
13301312 }
13311313
@@ -1379,18 +1361,6 @@ impl Renderer {
13791361 // Advance line_y for the next line
13801362 line_y += line_height;
13811363 }
1382-
1383- let t_lines_total = t_lines_start. elapsed ( ) ;
1384- let _t_graphics = t_after_graphics. elapsed ( ) - t_lines_total;
1385- println ! (
1386- "[draw_layout] lines: {:?} | empty: {} text: {} | cache: {}µs glyphs: {}µs draw_run: {}µs" ,
1387- t_lines_total,
1388- perf_empty_runs,
1389- perf_text_runs,
1390- perf_cache_lookup_ns / 1000 ,
1391- perf_glyph_build_ns / 1000 ,
1392- perf_draw_run_ns / 1000 ,
1393- ) ;
13941364 }
13951365 }
13961366
0 commit comments