Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance Enhancement: High idle resource usage #30

Open
HeyBanditoz opened this issue Apr 30, 2018 · 3 comments
Open

Performance Enhancement: High idle resource usage #30

HeyBanditoz opened this issue Apr 30, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@HeyBanditoz
Copy link

HeyBanditoz commented Apr 30, 2018

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 Rockdtben added the enhancement New feature or request label Aug 12, 2018
@Rockdtben Rockdtben changed the title High idle resource usage Performance Enhancement: High idle resource usage Aug 12, 2018
@Rockdtben
Copy link
Contributor

Rockdtben commented Aug 12, 2018

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

image

@Rockdtben
Copy link
Contributor

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

@Rockdtben
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants