More UserInterfaceSystem metrics - #10
Merged
Merged
Conversation
Author
StarlightHost
approved these changes
Jul 1, 2026
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.



Description
Adds metrics to UserInterfaceSystem
UpdateandSetStatemethods:robust_bui_update_usageis the Update step broken down into 3 sub-phases with timing per phase.robust_bui_set_state_usageis the SetState method per BUI state object typerobust_bui_range_check_usageis the parallel range check job from the Update method, per BUI enum key.Adds CVar to enable these metrics:
metrics.granular_ui_system, defaultfalse.Here's hoping this gives us enough info to find where our precious CPU time is going.
Reason
We're getting lag reports from users, and seeing this huge uptick in the UserInterfaceSystem update usage:
https://grafana.starlight.network/d/qyFqpFiGk2/perf-metrics?orgId=1&from=2026-07-01T08:08:45.015Z&to=2026-07-01T10:08:31.539Z&timezone=browser&var-Server=watchdog-starlight%2Fbeta-watchdog&viewPanel=panel-100
Some shifts it doesn't happen, some it's present almost the entire round (as shown here).
I've not been able to determine what UI causes this, hence more granular metrics for the SharedUserInterfaceSystem.
Please squash merge