git.lucas.co / cce-ui
GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git

commit2a38f0f630c127223c9a1b207c30663dfee783e3
parentbe59deae8e
authorLucas Galante <[email protected]>
date2026-07-07 17:32
perf: remove per-frame text-area debug logging from render()

render() reconstructed and eprintln'd every text area's string via layout_runs() on every frame — a real CPU + I/O cost in the render hot path. Left-in debug code; removed.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

 src/backend/window_runner.rs | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/src/backend/window_runner.rs b/src/backend/window_runner.rs
index dd641a1..9439d6f 100644
--- a/src/backend/window_runner.rs
+++ b/src/backend/window_runner.rs
@@ -1767,17 +1767,6 @@ impl<A: Application> EngineState<A> {
         
         let bounds = TextBounds { left: 0, top: 0, right: pw as i32, bottom: ph as i32 };
         let areas = self.inner.as_ref().unwrap().text_areas(scale_f32, bounds);
-        eprintln!("AREAS_LEN: {}", areas.len());
-        for (idx, area) in areas.iter().enumerate() {
-            let mut text_snippet = String::new();
-            for run in area.buffer.layout_runs() {
-                text_snippet.push_str(run.text);
-            }
-            eprintln!("TEXT_AREA idx={}: text='{}', left={}, top={}, bounds=[{}, {}, {}, {}]",
-                idx, text_snippet, area.left, area.top,
-                area.bounds.left, area.bounds.top, area.bounds.right, area.bounds.bottom);
-        }
-        
         adapter.text_renderer.prepare(&adapter.device, &adapter.queue, &mut adapter.font_system, &mut adapter.text_atlas, &adapter.text_viewport, areas, &mut adapter.swash_cache).unwrap();
         
         // 3. Render Pass