Skip to content

Add option to render in a web worker #259

@jaredjj3

Description

@jaredjj3

Drawing the rendering is the most computationally expensive process, and it blocks the main thread. I think it's unacceptable for blocks O(100ms).

Investigate the possibilities of:

  • rendering SVG in a web worker, then piping the raw SVG data back
  • rendering canvas in an OffscreenCanvas, then transferring ownership to the main thread.

This would make rendering asynchronous, so we'll need to expose an appropriate API.

The main thing I'm unsure of is if this library needs some Web API that's not available in the web worker context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions