Skip to content

fix #18296: fixed Accordion Memory Leak#18297

Merged
cetincakiroglu merged 2 commits into
primefaces:masterfrom
rosenthalj:AccordionmemoryLeak
May 16, 2025
Merged

fix #18296: fixed Accordion Memory Leak#18297
cetincakiroglu merged 2 commits into
primefaces:masterfrom
rosenthalj:AccordionmemoryLeak

Conversation

@rosenthalj

@rosenthalj rosenthalj commented May 9, 2025

Copy link
Copy Markdown
Contributor

Fix #18296
Fixed memory leak in AccordionContent component.

While investigating the memory leak I determined the problem was caused by the component's use of animation. I initially assumed the problem was caused by the implementation of signals. I confirmed that signals was not causing the problem. I then compared the current v19 Accordion code with the deprecated AccordionTab, since v17 PrimeNG demo didn't have the memory leak. The difference between the animation implementation was that v17 animation was attached to the content DIV and v19 animation was attached to the host. Moving the animation back to the content DIV fixed the memory leak.

The video listed below shows this PR fixes the memory leak is fixed

AccordionAfterFixGood.mov

@vercel

vercel Bot commented May 9, 2025

Copy link
Copy Markdown

@rosenthalj is attempting to deploy a commit to the primetek Team on Vercel.

A member of the Team first needs to authorize it.

@rosenthalj

rosenthalj commented May 9, 2025

Copy link
Copy Markdown
Contributor Author

Ignore this comment. See next comment. PR is good to go.

After additional testing, I'm not sure this is the optimal solution. After this fix, the animation is not as smooth as before the fix. I don't know how to fix this or even if this can be fixed.

Accordions can contain a large amount of data, so this memory leak has to be fixed.

The video listed below shows the animation before and after the fix. The left browser is the v19 demo and the right browser is after the fix.

AccordionAnimationComparisonBeforeAndAfterFix.mov

@rosenthalj

rosenthalj commented May 9, 2025

Copy link
Copy Markdown
Contributor Author

I have updated the PR and the changes are now good to go. With the second commit the animation is smooth.

The video listed below shows the smooth animation after the additional change.

AccordionSmoothAnimationFix.mov

@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Type: Bug Issue contains a bug related to a specific component. Something about the component is not working labels May 16, 2025
@cetincakiroglu cetincakiroglu merged commit ca292dc into primefaces:master May 16, 2025
2 of 4 checks passed
@cetincakiroglu cetincakiroglu added this to the 20.0.0 milestone Jul 4, 2025
@github-project-automation github-project-automation Bot moved this to Review in PrimeNG Jul 4, 2025
@cetincakiroglu cetincakiroglu removed this from the 20.0.0 milestone Jul 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review

Development

Successfully merging this pull request may close these issues.

Accordion Functionality Memory Leak

3 participants