"Performance Bottleneck with Cesium3DTileStyle When Managing Large-Scale BIM Models (50k+ GLBs)"

Hello Cesium team, I hope this message finds you well. I’m currently encountering a challenging issue with my project, which involves building a BIM model composed of nearly 50,000 GLB files. The problem arises when using the `Cesium.Cesium3DTileStyle(style)` API to control the visibility of models by their specific IDs—specifically, by adjusting the alpha transparency. From my troubleshooting, I’ve observed that when the number of BIM models exceeds a certain threshold, operations using `Cesium.Cesium3DTileStyle(style)` cause the page to freeze outright, often for tens of seconds, and in some cases even hundreds of seconds. I suspect this might be due to a CPU bottleneck caused by the `Cesium.Cesium3DTileStyle(style)` operations. Could this be the case? If so, are there any more optimal approaches or best practices to achieve this functionality? I would be extremely grateful for any guidance or insights you could provide. Thank you for your time and assistance—I look forward to your expertise.

Hi @tjw2066,

Could you provide us with any sample sandcastle, even if it doesn’t necessarily work / use your actual model? I’m mostly interested in seeing how you’re setting up the scene and what this style object looks like. Of course, with 50,000 GLB files, it’s possible (maybe even likely), that you’re doing everything right and Cesium is simply hitting a bottleneck, like you said. But before we go down that rabbit hole, let’s rule out any potentially simpler issues first.

Thanks,

Matt

I’m glad to say that I’ve solved this problem. When there are too many judgment conditions in Cesium3DTileStyle, it will cause lag. However, after I reduced the number of judgment conditions, the efficiency has improved a lot. Thank you.