Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Leak: DatePicker, Tab, ToolTip #1286

Closed
GMInf opened this issue Apr 29, 2022 · 3 comments · Fixed by infor-design/enterprise#6504
Closed

Memory Leak: DatePicker, Tab, ToolTip #1286

GMInf opened this issue Apr 29, 2022 · 3 comments · Fixed by infor-design/enterprise#6504
Assignees
Labels
team: m3 Issues for m3 type: bug 🐛 [3] Velocity rating (Fibonacci)

Comments

@GMInf
Copy link
Contributor

GMInf commented Apr 29, 2022

Describe the bug
Accumulation of detached HTML Elements from DatePicker, Tab, ToolTip enterprise-ng Demo

To Reproduce
Steps to reproduce the behavior:
DatePicker

  1. Run enterprise-ng
  2. Select http://localhost:4200/ids-enterprise-ng-demo/datepicker
  3. Open Dev tools
  4. Select Memory tab – select Allocation Instrumentation on timeline
  5. Record and stop after 3 seconds. This is to establish a baseline for comparing the detached html elements
  6. Filter for “detached html”
  7. Start a new record
  8. Click on datepickers to open calendars
  9. Click on Force Garbage Collect and Stop recording
  10. Filter for “detached html”
  11. Compare the two recordings
  12. New detached elements have been added. This accumulates as more datepickers are opened.

Tooltip

  1. Run enterprise-ng
  2. Select the http://localhost:4200/ids-enterprise-ng-demo/tooltip
  3. Open Dev tools
  4. Select Memory tab – select Allocation Instrumentation on timeline
  5. Record and stop after 3 seconds. This is to establish a baseline for comparing the detached html elements
  6. Filter for “detached html”
  7. Start a new record
  8. Click on http://localhost:4200/ids-enterprise-ng-demo/tooltip-nested and then go back to http://localhost:4200/ids-enterprise-ng-demo/tooltip. This should destroy the components on tooltip demo and create new ones
  9. Click on Force Garbage Collect and Stop recording
  10. Filter for “detached html”
  11. Compare the two recordings
  12. New detached elements have been added. This accumulates as more tooltip demo components are created and destroyed.

Tab

  1. Run enterprise-ng
  2. Select the http://localhost:4200/ids-enterprise-ng-demo/tabs-dynamic
  3. Open Dev tools
  4. Select Memory tab – select Allocation Instrumentation on timeline
  5. Record and stop after 3 seconds. This is to stablish a baseline for comparing the detached html elements
  6. Filter for “detached html”
  7. Start a new record
  8. Close a tab
  9. Click on Force Garbage Collect and Stop recording
  10. Filter for “detached html”
  11. Compare the two recordings
  12. New detached elements have been added. This accumulates as more tabs are closed.
  13. Close the last tab, repeat 9. to add more detached HTML elements

Expected behavior
There should be no detached HTML elements found after destroying the components. Other demo components does not leave any or accumulate any detached HTML elements.

Version

  • ids-enterprise-ng: [main/13.x]

Screenshots
If applicable, add screenshots to help explain your problem.

Platform

  • OS Version: [Windows 11]
  • Browser Name [e.g. chrome]
  • Browser Version [100.0.4896.75 (Official Build) (64-bit)]

Additional context
Add any other context about the problem here.

@tmcconechy tmcconechy self-assigned this Apr 29, 2022
@tmcconechy tmcconechy added type: bug 🐛 [3] Velocity rating (Fibonacci) labels Apr 29, 2022
@tmcconechy tmcconechy added this to To do in Enterprise 4.63.x (Apr 2022) Sprint via automation Apr 29, 2022
@tmcconechy
Copy link
Member

@GMInf Before we dig into this one... Let me explain what im seeing to make sure.

In all three of these cases you didnt destroy? So this is what im doing... For example for the last case

  1. Go to http://localhost:4200/ids-enterprise-ng-demo/tabs-dynamic
  2. go to memory tab in chrome tools, garbage collect and take a heap snap shot
  3. close a tab
  4. switch to another page and then back (to destroy
  5. go to memory tab in chrome tools, garbage collect and take a second heap snap shot
  6. select "comparison" to compare first and second
  7. search for detatch html -> notice there are no + deltas

I think having it "destroy itself" while its still on the page? Not sure about that?

@tmcconechy tmcconechy removed their assignment Apr 29, 2022
@tmcconechy tmcconechy added this to To do in Enterprise 4.64.x (May 2022) Sprint via automation Apr 29, 2022
@tmcconechy tmcconechy added the team: m3 Issues for m3 label Apr 29, 2022
@ericangeles ericangeles self-assigned this May 2, 2022
@GMInf
Copy link
Contributor Author

GMInf commented May 2, 2022

For the 3rd case Tabs-dynamic, I did not destroy the tab-dynamic component. I only closed the opened tab items. The expected result should be that the tab-items should be destroyed when closed. But the number of detached htmls accumulates as tab items are closed.

  1. Go to http://localhost:4200/ids-enterprise-ng-demo/tabs-dynamic
  2. go to memory tab in chrome tools, garbage collect and take a heap snap shot
  3. close a tab
  4. go to memory tab in chrome tools, garbage collect and take a second heap snap shot
  5. select "comparison" to compare first and second
  6. search for detatched html -> new detached htmls
  7. close a tab
  8. go to memory tab in chrome tools, garbage collect and take a second heap snap shot
  9. select "comparison" to compare first and second
  10. search for detatched html -> new detached htmls

When switching to another page (destroy tab-dynamic) then all detached htmls are destroyed. But our app uses of a dynamic tab that is present at all times. That would cause a memory leak as tab items are closed.

@ericangeles ericangeles moved this from To do to In progress in Enterprise 4.64.x (May 2022) Sprint May 25, 2022
@ericangeles ericangeles moved this from In progress to Pending Review in Enterprise 4.64.x (May 2022) Sprint May 30, 2022
@tmcconechy tmcconechy moved this from Pending Review to Failed QA (beta) in Enterprise 4.64.x (May 2022) Sprint Jun 1, 2022
@tmcconechy tmcconechy moved this from Failed QA (beta) to Ready for QA (beta) in Enterprise 4.64.x (May 2022) Sprint Jun 1, 2022
@CindyMercadoReyes
Copy link

This issue is now resolved.

@CindyMercadoReyes CindyMercadoReyes moved this from Ready for QA (beta) to Done in Enterprise 4.64.x (May 2022) Sprint Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team: m3 Issues for m3 type: bug 🐛 [3] Velocity rating (Fibonacci)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants