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

Test pre-drawing of components #97

Open
GMartigny opened this issue Sep 22, 2021 · 0 comments
Open

Test pre-drawing of components #97

GMartigny opened this issue Sep 22, 2021 · 0 comments
Labels
✨ enhancement New feature or request

Comments

@GMartigny
Copy link
Member

A nice method to gain in performance is to use pre-draw.

Basically, each shapes is stored as an image and drawn in place when needed.

As all form of cache, the real issue is to know when to redraw (all specific props and some options modifications). Possible solutions:

  • At each loop, check all options against the cached ones (easier, but more memory used)
  • Attach some kind of watcher (easy with setOptions, but don't cover everything. Best solution is to use watcher everywhere like Vue.js)

An advantage is that we don't need to redraw with some modification (position, all Container options, cursor and origin).

Also, does this works with mouse interaction ? We check against a Path2D object, so do we need to keep both ?
What's the impact on memory ?

@GMartigny GMartigny added the ✨ enhancement New feature or request label Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant