Skip to content

Updating gradient regurarly increases amount of node elements and overloads the page #25

@iamisti

Description

@iamisti

Describe the bug
I have a usecase when i need to update the gradient on the svg path multiple times.
Unfortunately every time I call the render method, it doesn't override the previous gradient node, but it creates new ones.
This becomes a problem after some time, when I end up 5k node elements, which is very bad for performance.

To Reproduce
Steps to reproduce the behavior:

  1. Add gradient to an svg path
  2. use .render method to render gradients
  3. do it multiple times
  4. check performance monitor in chrome and you'll see that the node count is going up

Expected behavior
I'd expect to have a cleanup process before the gradient renders

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions