Browser lag when folder with many assets is open

Hello. An issue we keep having in our projects is our browsers grinding to a halt when we have a folder open witth many assets in it. It’s not uncommon for us to have hundreds of materials in a common material folder (since we have baked versions of our models). Having a folder open with 128 materials has a noticable impact on performance, even when viewing an empty scene. Having 256 materials, we get maybe 15 FPS. Some of our projects have even more, which makes it impossible to work efficiently.

My guess would be that the browser renders every single asset in the folder, even though they’re not visible. Would it be possible to implement some sort of culling system so that only the visible assets are being rendered?

Here’s a test project containing many materials:
https://playcanvas.com/project/916789/overview/asset-thumbnails-performance

I’m not sure I can reproduce the behaviour you mention. When I open the folder with 512 materials, and set it up the way I only see small number of materials in the Asset Panel (by making it smaller, or using Detail View), the performance is fine. When I make it very large and use Grid VIew (small), then I see the performance impact. Based on this it seems the “culling of material thumbnails” already works?

Could you please post a screenshot of what you see on the screen?

Ah I see. If I make the Asset Panel small, and reload the Editor and switch to 512 folder, it’s fast - I assume because the other thumbnails are not generated yet. But when I then scroll to the bottom of the Asset Panel, which generates thumbnails, then it becomes slow, even when I scroll back to the top.

Sorry, I should have remembered to mention that. Didn’t think of it when I created the test project. But yes, the problem gets worse after scrolling through the folder.

Still, when I refresh the page and enter the 512 folder, I get slightly lower fps than when in the root folder. When I look at the CPU usage I see that a single core goes to 100%, while the rest are pretty much unused. This problem is exacerbated by the fact that I’m running a Xeon processor at work, which has lots of slower cores (compared to a consumer CPU).

Could you please create an issue here: Issues · playcanvas/editor · GitHub
and link it to this forum post
thanks!

Yep, here you go.

2 Likes