getavalon / core

The safe post-production pipeline - https://getavalon.github.io/2.0
MIT License
213 stars 48 forks source link

Speed up getting assets for asset switcher #561

Closed jasperges closed 3 years ago

jasperges commented 3 years ago

What's changed?

When querying the assets to populate the asset switcher a database call was made for every asset. If you have lots of assets this can really add up and take quite some time (for me roughly 30 seconds for 2000 assets).

This change does only 2 database calls and then does the filtering afterwards. In my case this reduces the time taken to around 3 seconds for 2000 assets.

tokejepsen commented 3 years ago

@iLLiCiTiT has worked on the same thing.

jasperges commented 3 years ago

Whoops, forgot to check other PR's first... will have a look at https://github.com/getavalon/core/pull/551.

jasperges commented 3 years ago

Okay, sorry for the noise and nevermind. https://github.com/getavalon/core/pull/551 works fine for me. Closing this one.