angarg12 / nucleogenesis

Nucleogenesis JS incremental game
GNU General Public License v3.0
40 stars 21 forks source link

Performance improvement #168

Closed Stevel-Knievel closed 6 years ago

Stevel-Knievel commented 6 years ago

I'm making this because discord won't accept files large enough for me to send what I need to send. Thus, new thread.

Chrome Profile 1.zip

angarg12 commented 6 years ago

We pushed a patch that removed some unnecessary data copy. That should improve performance significantly.

Digging into the profiling there are two obvious vectors for improvement.

One is the upgraded production function. Caching the results and only updating when necessary (e.g. a new upgrade bought) would significantly improve performance.

Another is visible resources. If we display resources in the current run instead of the whole array of resources, this should also improve performance.

Other costly function is process electronegativity but further investigation needs to be done about how to optimise it.

angarg12 commented 6 years ago

Now that offline gains has been changed to faster ticks this improvement is not as crucial.

Also in the last few weeks we have introduce a few performance improvements.

I'll go ahead and close this issue. If specific recommendations for performance improvement come up we can open separate issues.