Fydar / AssetIcons

The public issue tracker and documentation for AssetIcons
https://fydar.dev/portfolio/asseticons
7 stars 0 forks source link

Remove allocations from draw-loop #17

Closed Fydar closed 4 years ago

Fydar commented 5 years ago

There are some instances of objects being instantiated during the update loop that could lead to the performance of AssetIcons to degrade when it comes to rendering large quantity of icons.

It would be a good idea to perform a complete sweep of all of the code to ensure that there are no allocations in this code that runs frequently.

Fydar commented 5 years ago

I've profiled the draw loop. Unfortunately, Unity allocates massive amounts of memory every draw for something to do with packages. This makes it really hard to see if I'm having any impact on GC.

So I'm going to have to go through the code base and remove instances of allocations.

I've already removed the excessive amounts of boxing that occur, however the largest allocations made are likely the ones being made by AssetTarget. Caching these is something I will look into in the future.

Fydar commented 4 years ago

I'm implementing cached AssetTargets as apart of improving the low-level API for #10 so that I can utilise the asynchronous API for loading addressable assets.