Memory leak with adding/removing block components #9177
Labels
4 - verified
Issues that have been released and confirmed resolved.
ArcGIS Field Apps
Issues logged by ArcGIS Field Apps team members.
bug
Bug reports for broken functionality. Issues should include a reproduction of the bug.
calcite-components
Issues specific to the @esri/calcite-components package.
estimate - 2
Small fix or update, may require updates to tests.
impact - p2 - want for an upcoming milestone
User set priority impact status of p2 - want for an upcoming milestone
p - high
Issue should be addressed in the current milestone, impacts component or core functionality
Milestone
Check existing issues
Actual Behavior
Detached
<calcite-block>
elements are unexpectedly retained in memory.Expected Behavior
They are not unexpectedly retained in memory.
Reproduction Sample
https://codepen.io/nwhittaker-esri/pen/YzMBXVY
Reproduction Steps
Reproduction Version
2.7.1
Relevant Info
Looking at the memory dump, it looks like these blocks might be being over-retained by a mutation observer. Since the observer is shared code, other components may be exhibiting a similar memory leak.
Regression?
No response
Priority impact
p2 - want for current milestone
Impact
The memory leak is an issue that may become more noticeable as the team writes larger and more complex custom components. Performance issues may become noticeable to users on slower hardware.
To provide a granular editing experience, we stack panels on top of each other. The top panel organizes different custom components into calcite-blocks. We're seeing each new instance of our custom components being retained. So, if the user opens/closes the panel 6 times, 6 instances of each of our custom components are retained and never garbage collected.
Calcite package
Esri team
ArcGIS Field Apps
The text was updated successfully, but these errors were encountered: