Skip to content

Test pre-drawing of components #97

@GMartigny

Description

@GMartigny

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions