Skip to content

Prewarm mod cache #1279

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

Merged
merged 3 commits into from
Apr 15, 2024
Merged

Prewarm mod cache #1279

merged 3 commits into from
Apr 15, 2024

Conversation

anttimaki
Copy link
Collaborator

No description provided.

The setter already called an async method without waiting for the
result. Upcoming changes will add more async calls into the method, so
better make it async too.
Changes that moved the mod cache from ModBridge class to Vuex caused
the initial rendering of the local mod list take roughly twice as long
as before (although subsequent renderings were a bit faster). Since
effort has been placed recently to improve the performance, this isn't
ideal.

One solution to improve the performance is to start prewarming the
cache as soon as a profile is selected. This obviously causes a slight
performance hit when a larger profile is selected, but overall this is
likely less noticeable to the user.

Once the cache is warmed, there's no point in resetting the mod list
when moving to Manager screen and reloading it there. These changes
will make moving to the Manager screen actually faster than it was
before (after the cache warming is done), and as a bonus the waiting
happens on profile screen, meaning the "no mods here" disclaimer does
not flash on screen while the mod list is loaded.
This doesn't affect performance as much as doing the same on the
profile selection screen, but is nice for consistency.
@anttimaki anttimaki force-pushed the prewarm-mod-cache branch from 685a462 to 243b3f9 Compare April 3, 2024 13:24
@anttimaki anttimaki marked this pull request as ready for review April 3, 2024 13:24
Copy link
Collaborator

@MythicManiac MythicManiac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% certain about what's going on just from the context of this PRs changes (as they refer getters/setters defined in prior changes), but at least the goal of prewarming the cache seems like a good idea & at a high level I didn't spot any issues.

Base automatically changed from move-vuex-items to develop April 15, 2024 06:36
@anttimaki anttimaki merged commit 5ad03da into develop Apr 15, 2024
@anttimaki anttimaki deleted the prewarm-mod-cache branch April 15, 2024 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants