Skip to content
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

[Tweak] Disable WorldListFacet refreshing when the slot hierarchy is disabled #2970

Open
Zyro1331 opened this issue Sep 16, 2024 · 5 comments
Assignees
Labels
enhancement Suggested addition of a new feature. triaged This issue has been assessed

Comments

@Zyro1331
Copy link

Is your feature request related to a problem? Please describe.

Currently, most users on mid-range computers experience a moderate lag spike every ~5 seconds due to the WorldListFacet refreshing itself.
This lag spike will continue to repeatedly occur even while the Worlds tab is closed or while the whole Dashboard is closed.

Upon switching tabs in the Dashboard or closing it, the Dash disables various slot hierarchies to save a bit of performance. The WorldListFacet doesn't exactly obey having its component or it's parent slots disabled, as it will continue to refresh according to the IdleSortDelay parameter. Only upon disabling the slot that the WorldListFacet is attached to will disable the constant refreshing of Worlds. (You can see evidence of this happening by monitoring the components "IsSearching" value, and then playing with the active state of the slot hierarchy until it stops repeatedly changing.)

Describe the solution you'd like

The WorldListFacet component should temporarily disable Refreshing / Sorting when the slot hierarchy above or component itself is disabled. This will alleviate the repetitive ~5 second lag spikes and make things feel a little bit smoother for average users.

Describe alternatives you've considered

A small potential problem with the solution above is upon users interacting with the Worlds tab after having it closed for a while is going to see largely out-of-date world data for a few seconds before the World List gets to refresh itself.
Instead of completely disabling the WorldListFacet's refreshing behaviour while inactive, it could just have its IdleSortDelay be increased to something like 60 - 120 seconds, that way it feels less obtrusive when getting fresh World list data in the background.

Additional Context

You can see an example of this issue being first observed here: #2895 (comment)
Just a few comments down from the previous, you can see me finding the cause and even proving that it's related to the Worlds tab refreshing itself: #2895 (comment)

Requesters

@Zyro1331

@Zyro1331 Zyro1331 added the enhancement Suggested addition of a new feature. label Sep 16, 2024
@Frooxius
Copy link
Member

Hmm... this is a bit odd, because it should already be doing that - when it's off, it should just stop updating.

How exactly are you detecting that it's the cause of the lag spikes? It could be something else potentially or the mechanism is broken.

@Zyro1331
Copy link
Author

Hmm... this is a bit odd, because it should already be doing that - when it's off, it should just stop updating.

How exactly are you detecting that it's the cause of the lag spikes? It could be something else potentially or the mechanism is broken.

Under the additional context section, I link to a comment I made on issue #2895 where I completely take out all the facets on the Worlds screen, showing that the lag spikes correlate to the behaviour of it refreshing. With my own experiments, I've used a Userspace inspector to set the IdleSortDelay to a value of 120 and now I only see the lag spike every two minutes.

With additional some small testing with a standalone WorldListFacetPreset, I also determined that new worlds and sessions continue to populate even while the whole slot hierarchy is disabled or even while the component is disabled. It's only upon disabling the slot that the WorldListFacet component is attached is when it stops updating the world list.

@Frooxius
Copy link
Member

Ah I see! Thanks for the info. I'll poke around this when I can.

@Frooxius Frooxius assigned Frooxius and unassigned shiftyscales Sep 16, 2024
@Frooxius
Copy link
Member

Unless somebody else wants to steal this: @BlueCyro @RyuviTheViali

@shiftyscales shiftyscales added triaged This issue has been assessed labels Sep 16, 2024
@BlueCyro
Copy link

I'll put this on my docket

@BlueCyro BlueCyro assigned BlueCyro and unassigned Frooxius Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Suggested addition of a new feature. triaged This issue has been assessed
Projects
Status: To Do
Development

No branches or pull requests

4 participants