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 #1

Open
deciduously opened this issue Sep 4, 2018 · 2 comments
Open

Performance #1

deciduously opened this issue Sep 4, 2018 · 2 comments
Assignees

Comments

@deciduously
Copy link
Owner

deciduously commented Sep 4, 2018

On my desktop I noticed no issues, but this thing slowed to a crawl in Chrome on my 2012 laptop. Firefox had no problem.

Stop one is to remove all calls to Game outside of tick() and pack() and restart(). Things like "last_update" and "progress string" (whcih s just num_dots - captured dots, so just pass through the cpatured count and let JS subtract) and "num_dots" should get packed into the Vec - design a series of f32s that hold all the necessary info and put them in front, and then in drawGame handle those values before starting your for loop at the proper offset

@deciduously deciduously self-assigned this Sep 4, 2018
@deciduously
Copy link
Owner Author

I've now done that - the renderLoop only calls out to game.pack() and game .tick(), everything is included in the packed array.

Still very slow on the older laptop in Chrome, and perfectly fine in Firefox.

@deciduously
Copy link
Owner Author

separating the header u8s from the dots u32 didnt help...

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

No branches or pull requests

1 participant