-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ui is slow when tilt starts with many resources that have a "pending" disable status #5496
Comments
for what it's worth, I also noticed some non-deterministic sluggishness when you change the disabled set, but still trying to understand where it's coming from. Seems like it takes some time for the change to make it to the UI. I don't think it's because the writes to the API server are slow. But I also don't think it's because the UI is slow. Seems to be something in between the two? |
After doing some debug logging and profiling when bulk disabling 30 resources (through the UI), I'm pretty consistently seeing: |
Hmmmm... ok i think i understand the problem. I was under the impression that
However, in my testing, it's not really doing any kind of batching at all. Instead, what's happening is:
i think we can add some simple batching on the server to make this a lot better. (there's a bigger systemic issue - why do we need to re-render the whole ui on one uiresource update? - but that doesn't lend itself as well to easy fixes) |
Do you want to tackle this or shall I?
Even worse! When I disable 30 resources, it takes ~10 seconds, generates ~130 calls to Hud.mergeAppUpdates, and ~2/3 of those are just updating a UIButton! |
should we consider this fixed? |
Yes! The UI is so much faster. Thanks! |
Expected Behavior
The UI should only display enabled resources by default on
tilt up
, and it shouldn't be sluggish to display them.Current Behavior
After the initial Tiltfile execution, Tilt create UIResources with a "pending" disable status. The uiresource objects are (theoretically) quickly updated with the correct enabled or disabled status (which may be based on
tilt args
and Tiltfile config info).The UI will hide disabled resources by default, but it currently doesn't take into account a pending disable status. It'll treat a "pending" status as "enabled" and display the resource.
If you have many resources (> 75 in my testing) defined in a Tiltfile and are running a small subset of them, this may lead to performance issues in the UI while the disable status is updated for each resource. Some users have reported that the "pending" disabled resources show up for about 1 minute, and it takes another minute or two for all the disabled resources to hide. (Yikes!)
Steps to Reproduce
I've seen the same issue often enough in my own testing (see debug-many-resources repo), but I can't reliably reproduce the "pending" disabled sluggish state. (See #5495 for more info on the general performance issue.)
For now, the most straightforward solution is probably for the UI to treat a "pending" disable status as "disabled." We can discuss other UI treatments and/or how disable status gets populated.
The text was updated successfully, but these errors were encountered: