My WebGL game seems to slow down after running for several hours. I’m currently running it in Chrome with the Profiler connected, and here’s some data from the Memory window:
Upon starting:
GameObjects in Scene: 2,151
Total Objects in Scene: 10,084
Total Object Count: 14,369
After running for 2 hours:
GameObjects in Scene: 2,464
Total Objects in Scene: 11,748
Total Object Count: 16,127
I could really use some advice on how to track down where all these extra objects are. I’m still pretty new to the Profiler. In other words, is there a way to show all the new objects since a certain time? Halp!
There are plenty of profiler guides / tutorials online but I think a good place to start is the GC Alloc column in the CPU Usage profiler which shows the total amount of memory allocated in a specific frame.