personalizedrefrigerator / js-draw

Draw pictures using a pen, touchscreen, or mouse! JS-draw is a freehand drawing library for JavaScript and TypeScript.
https://personalizedrefrigerator.github.io/js-draw/typedoc/
MIT License
79 stars 8 forks source link

High memory usage in large images with many Stroke objects #11

Open personalizedrefrigerator opened 1 year ago

personalizedrefrigerator commented 1 year ago

Describe the bug

A 13 MiB image can use 110-130 MiB of RAM after loaded by js-draw.

To Reproduce

Steps to reproduce the behavior:

  1. Create a very large image with many strokes.
  2. Open Chrome developer tools > Memory

Version: 0.5.0