Description
A significant memory leak occurs when 3 or more chart instances are initialized with responsive configuration options and subjected to data updates via updateSeries. Memory usage scales exponentially, reaching several gigabytes after a few update triggers. This is accompanied by an exponential increase in render times.
Steps to Reproduce
-
Initialize 3 or more chart instances.
-
Ensure your browser width doesn't hit the responsive breakpoint
-
Include a responsive array in the chart options for each instance.
-
Call updateSeries repeatedly on all instances.
-
Monitor the JS Heap and render durations.
Expected Behavior
Memory usage should remain stable, and updateSeries execution time should remain consistent across updates.
Actual Behavior
Memory: The JS heap size grows by hundreds of megabytes per update cycle.
Performance: Render times increase from ~50ms to 10+ seconds after 8 updates.
Heap Analysis: Comparison of heap snapshots shows an exponential increase in the number of config and internal state objects.
Reproduction Link
https://codepen.io/monsieurvor/pen/LEZYMvV
Description
A significant memory leak occurs when 3 or more chart instances are initialized with responsive configuration options and subjected to data updates via updateSeries. Memory usage scales exponentially, reaching several gigabytes after a few update triggers. This is accompanied by an exponential increase in render times.
Steps to Reproduce
Initialize 3 or more chart instances.
Ensure your browser width doesn't hit the responsive breakpoint
Include a responsive array in the chart options for each instance.
Call updateSeries repeatedly on all instances.
Monitor the JS Heap and render durations.
Expected Behavior
Memory usage should remain stable, and updateSeries execution time should remain consistent across updates.
Actual Behavior
Memory: The JS heap size grows by hundreds of megabytes per update cycle.
Performance: Render times increase from ~50ms to 10+ seconds after 8 updates.
Heap Analysis: Comparison of heap snapshots shows an exponential increase in the number of config and internal state objects.
Reproduction Link
https://codepen.io/monsieurvor/pen/LEZYMvV