⚡ Bolt: Optimize drw_map by replacing XSync with XFlush#174
⚡ Bolt: Optimize drw_map by replacing XSync with XFlush#174google-labs-jules[bot] wants to merge 1 commit intodevfrom
Conversation
Replaced the blocking `XSync` call with `XFlush` in `drw_map`. This eliminates unnecessary round-trips to the X server during drawing operations, significantly reducing latency and improving responsiveness for frequent UI updates (like status bar refreshes and window redrawing). `XFlush` is sufficient here as it pushes the `XCopyArea` request to the server without waiting for a reply, which is safe since we do not need immediate feedback from the server for this operation.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
💡 What: Replaced
XSync(drw->dpy, False)withXFlush(drw->dpy)indrw_map.🎯 Why:
XSyncforces a blocking round-trip to the X server, causing latency in the main thread during every draw operation. This is unnecessary for simple drawing commands where we don't need to read back data or handle errors immediately.📊 Impact: Eliminates round-trip latency for all bar updates and window redraws handled by
drw. This improves the perceived responsiveness of the window manager, especially during high-frequency updates.🔬 Measurement: Verified by
make clean && maketo ensure correct compilation. Theoretical performance gain is 1 RTT (Round Trip Time) per draw call.PR created automatically by Jules for task 16017061530732502201 started by @paperbenni