Skip to content
This repository has been archived by the owner on Jul 10, 2020. It is now read-only.

Optimizing canvas rendering #5

Open
ghost opened this issue Dec 13, 2018 · 0 comments
Open

Optimizing canvas rendering #5

ghost opened this issue Dec 13, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Dec 13, 2018

Canvas rendering could be faster.

  • Cache groups of notes in a single texture. A separate drawImage() for every note is very slow, so grouping notes together once and rendering them all together can be significant for speed.

  • Use WebGL when available. A few small drawImage() and fillRect() shaders are all that would be needed. These would probably be much faster than drawImage() on a 2d canvas. 2d canvas can be used if a WebGL canvas is not available.

  • The whole layer/note loop is probably slower than it could be.

@ghost ghost added the enhancement New feature or request label Dec 13, 2018
@ghost ghost self-assigned this Dec 13, 2018
@ghost ghost removed their assignment Dec 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

0 participants