-
Notifications
You must be signed in to change notification settings - Fork 197
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
Update all - query performance #1203
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and reviewed, LGTM.
Here's some possible future iterations I came up with, any thougts? Version comparison Depending on the predicted future use cases,
Or either of those could be implemented separately, utilising Caching To avoid having two "caches" (
|
Oh I was supposed to mention this too, but forgot when I got distracted by the thoughts in the earlier comment.
|
Yeah I agree, I'll change that
What happens if the mod doesn't exist as part of the TS API (eg: locally imported)? I guess it'd return false, and then we try to ModBridge it and it wouldn't resolve to anything |
I'm not sure I get what you're asking about, i.e. what happens at what part of code? The cached ModBridge implementation returns |
@anttimaki Should be good for a re-review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in the latest commit look good to me.
There was some code iterating dependencies in the previous version however it doesn't appear to actually be needed. The dependencies are still downloaded as expected and the visual indication of the mods that are required to be updated are identical.
Overall this saves around 5 seconds of hanging when uninstalling, disabling, and dragging items in the installed mod view.
The reason for the performance impact is due to the localModList state update also triggering a check to fetch available updates for the update all banner. We could probably further improve performance by not doing the check when the banner is no longer visible however the performance gain from that is neglible in comparison.
For TMM
As pointed out by @anttimaki this will need updating on the TMM implementation, however should be able to be copy/pasted without any changes for now.