Open HeyBanditoz opened 6 years ago
Java Profiler: https://visualvm.github.io/index.html
Alright so it looks like the dumb thing keeps refreshing the graphics which makes zoomed out really bad.
I did some more research on this and I might be able to split it into 2 layers.
Layer 1: The map and all the objects Layer 2: Users selector cursor etc.
Then I can have Layer 2 get updated every tick. Layer 1 will get updated only check a change event occurs. (add/remove tile/object, modify variable, change filter. etc)
From what I have seen with my tests that would make small CPU spike every change, but it is way less than the 20% in the above graph. It spikes to about 5% usage and goes back down to near 1%.
When the program is idle, CPU and GPU usage seem very high, especially when zoomed out over a large area.
edit: Using this release.