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

profile and tune performance #61

Open
Jared-Sprague opened this issue May 8, 2018 · 3 comments
Open

profile and tune performance #61

Jared-Sprague opened this issue May 8, 2018 · 3 comments

Comments

@Jared-Sprague
Copy link
Contributor

I noticed some lag on the laptops

@mwcz
Copy link
Contributor

mwcz commented May 8, 2018

@Jared-Sprague Sitting backstage waiting on keynotes, I was doing some profiling. I think I found one source of lag. When a block is captured we call block.generateTexture() but it isn't used for anything. It lit up in the profiler. I removed it in branch no-generate-texture see commit: 9d32182

When I removed it the game ran noticably faster on my laptop.

@mwcz
Copy link
Contributor

mwcz commented May 8, 2018

Other than that the only source of lag I saw in the profiler was garbage collection. We have a lot of let and const in our functions and they build up the heap until the GC kicks in. I saw a few "Major GC" in the profiler. I don't think we can refactor that quickly enough though. :)

@mwcz
Copy link
Contributor

mwcz commented May 8, 2018

If the branch looks good to you, merge away. I wanted to get your thoughts first

Jared-Sprague added a commit that referenced this issue May 9, 2018
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

2 participants