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

Store list of local mods with updates on VueX #1181

Merged
merged 1 commit into from
Jan 27, 2024

Conversation

anttimaki
Copy link
Collaborator

For a profile with 109 mods and 40 updateable mods, calling DownloadProvider's getLatestOfAllToUpdate takes a second or two.

  • When entering local mod list, it gets called twice: once to show the banner about available updates, and once by DownloadModModal
  • While in settings view once per second due to setInterval in SettingsItem (that might also be something to look into)
  • Ridiculous number of times when the mods were updated via DownloadModModal. The update time for the example profile went from 315 seconds to 65 seconds (all downloads were cached both times)

Calling the method in VueX getter caches the value for subsequent calls, reducing the duration to milliseconds.

For a profile with 109 mods and 40 updateable mods, calling
DownloadProvider's getLatestOfAllToUpdate takes a second or two.

- When entering local mod list, it gets called twice: once to show the
  banner about available updates, and once by DownloadModModal
- While in settings view once per second due to setInterval in
  SettingsItem (that might also be something to look into)
- Ridiculous number of times when the mods were updated via
  DownloadModModal. The update time for the example profile went from
  315 seconds to 65 seconds (all downloads were cached both times)

Calling the method in VueX getter caches the value for subsequent
calls, reducing the duration to milliseconds.
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.

LGTM

@MythicManiac MythicManiac merged commit 488dc4a into develop Jan 27, 2024
4 checks passed
@MythicManiac MythicManiac deleted the cache-updateable-mods branch January 27, 2024 02:02
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