Repository navigation
UI Performance: Use one sys-call for current time in render-loop - #2649
Merged
AmmarAbouZor merged 2 commits intoSep 23, 2026
Merged
Conversation
* Use one time instant for all UI elements in render loop instead of each one of them making a system call with Instant::now() on their own. * Main host owns this instant and will update on each App::logic() call * Changes in UI components to call the method directly from `Host` * Action throttler receive the instant in it's signature as it doesn't live in the UI render loop. * Fallback for when it's called from outside UI thread is built by doing a sys-call for the current time at this state
* Interval updates recreated the throttle before it was queried, so the cool-down never applied. Use ActionThrottle::set_interval instead. * Requests deferred by the cool-down now use the live plot bounds rather than replaying bounds the user already left.
AmmarAbouZor
force-pushed
the
one_now_call_per_frame
branch
from
September 23, 2026 20:09
faab8e3 to
bd7317e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR improves UI performance by reducing system call to get the current time with
Instant::now()to one call that will be owned by the main Host and will be updated on eachegui::App::logic().UI elements gets the time from the host directly
Action throttler receive the instant in it's signature as it doesn't live in the UI render loop.
This PR also fixes small bug in charts data requests reducing it's frequency on log count updates