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

Reduce garbage collection #15

Open
Hachitus opened this issue Sep 4, 2016 · 0 comments
Open

Reduce garbage collection #15

Hachitus opened this issue Sep 4, 2016 · 0 comments
Milestone

Comments

@Hachitus
Copy link
Owner

Hachitus commented Sep 4, 2016

Especially in map movement and fog of war extensions, since those are the 2 most resource heavy parts. But elsewhere too.

The memory is not the issue in the game, but rather CPU and GPU efficiency. Doing garbage collection too often will slow down the javascript. There should be optimal efficiency for tasks. Remember to prioritize efficiency over memory-usage.

You can use stunts like object pooling (e.g. https://github.com/Nazariglez/obj-pool/blob/master/README.md), memoization etc. as you see most efficient.

Before you start optimizing, you should already take up performance results and compare them when doing the task and when the task is done. So we have better idea how much the efficiency has improved.

@Hachitus Hachitus added this to the v0.9 milestone Oct 28, 2016
@Hachitus Hachitus modified the milestones: v0.9, 0.10 Nov 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant