vinothpandian/react-sketch-canvas

Optimize data structure and code while keeping backward compatibility

vinothpandian opened this issue · 0 comments

The current implementation has to split eraser and pen strokes during render. This is reducing the performance (obviously) of the component.

  • Update CanvasPath to have both eraser and pen strokes separately (Reduce time complexity)
  • Update undo/redo to action based instead of replicating data (Reduce space complexity)
  • Keep backward compatibility by adding a split method in loadPaths