tgstation / FastDMM

A robust BYOND map editor
GNU General Public License v3.0
9 stars 13 forks source link

Performance Enhancement: High idle resource usage #30

Open HeyBanditoz opened 6 years ago

HeyBanditoz commented 6 years ago

Example (first column is CPU usage, last is GPU.)

When the program is idle, CPU and GPU usage seem very high, especially when zoomed out over a large area.

edit: Using this release.

Rockdtben commented 5 years ago

Java Profiler: https://visualvm.github.io/index.html

image

Rockdtben commented 5 years ago

Alright so it looks like the dumb thing keeps refreshing the graphics which makes zoomed out really bad.

Rockdtben commented 5 years ago

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%.