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

Prevent event listener accumulation #2074

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

florianlevy
Copy link

@florianlevy florianlevy commented Feb 6, 2025

Fix event listener leak in CheckSession service

After migrating our applications to Angular 17, users reported significant performance degradation after 2-3 hours of application usage. Our analysis revealed abnormal CPU usage and an increasing number of event listeners without any user actions.

This issue was previously reported in #2015. Implementing the proposed solution on fork resolved the performance problems.

Changes made:

  • Properly remove existing event listeners before adding new ones in CheckSession service
  • Prevent event listener accumulation during session checks
  • Add unit test

This fix addresses the eventListener leak that was causing performance degradation over time.

Related issue: #2015

@FabianGosebrink
Copy link
Collaborator

Omg thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants