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:
parent
eec26c9a41
commit
9427526a41
3 changed files with 26 additions and 12 deletions
|
@ -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();
|
||||
}
|
||||
})?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue