gpui: Clear the element arena after presenting the frame (#33338)
This is an easy way to shave some microseconds off the critical path for frame rendering. On my machine this reduces typical frame rendering latency by ~100 microseconds, probably quite a bit more on slower machines. Here is how long it typically takes to drop elements from the arena, from a fairly brief run:  Release Notes: - N/A
This commit is contained in:
@@ -2199,7 +2199,7 @@ impl Workspace {
|
||||
// (Note that the tests always do this implicitly, so you must manually test with something like:
|
||||
// "bindings": { "g z": ["workspace::SendKeystrokes", ": j <enter> u"]}
|
||||
// )
|
||||
window.draw(cx);
|
||||
window.draw(cx).clear();
|
||||
}
|
||||
})?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user