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

Optimize AssetModel refresh time #447

Merged
merged 5 commits into from
Sep 13, 2019
Merged

Conversation

BigRoy
Copy link
Collaborator

@BigRoy BigRoy commented Sep 12, 2019

Issue

There have been reports of the Asset Widget being slow to refresh on bigger projects. This resulted in slow launch times of the Loader and Project Manager for listing the assets.

*Where large project is defined as for example 2 seasons of 20 episodes, with each 30 shots. Resulting in 2 * 20 * 30 = 1200 assets and there have been reports of very slow load times

What has changed?

This is an optimization of the method that builds the hierarchy in the asset widget that is much faster for large projects. The way the assets are queried is now optimized to do less queries against the database, allowing it do more caching (as it will hit the same query more often) and have less problems with any delay in the connection with the database as there are much less calls to be made.

Funnily enough, it's also much faster for small projects. Win-win. 🚀

Indication of speed changes

  • Tested myself: 0.2790s -> 0.0055s
  • Reported by @iLLiCiTiT: 4.5s -> 0.01s
  • Reported by @tokejepsen: 10x speed improvement

Thanks to the team at pypeclub and @iLLiCiTiT to quickly separate out some commits related to the optimization.

@mottosso
Copy link
Contributor

Neat, well presented, looks like a no brainer. Feel free to merge when you're happy!

Copy link
Collaborator

@davidlatwe davidlatwe left a comment

Choose a reason for hiding this comment

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

Awesome ! Loader startup time on a big project, decreased from 12 sec down to less than 1 !

@BigRoy
Copy link
Collaborator Author

BigRoy commented Sep 13, 2019

Merging this. 👍

@BigRoy BigRoy merged commit abdb1ff into getavalon:master Sep 13, 2019
@BigRoy BigRoy deleted the faster_asset_model branch January 25, 2021 14:44
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.

5 participants