angular / angular/components

bug(tooltip): matTooltip leaks memory

Open
#20,110 6 comments 1 reaction 0 assignees View on GitHub
area: material/tooltip P2 perf
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

This issue has been reported previously, e.g. in #12644

#### Reproduction

Steps to reproduce:
1. Visit https://material.angular.io/components/tooltip/overview
2. Take memory snapshot.
3. Wiggle cursor over anything with an on-hover tooltip. (approx 100 times)
4. Take memory snapshot.
5. Repeat 3 and 4 to see an upward trend in memory usage.


#### Expected Behavior

Memory usage does not increase indefinitely due to toggling tooltip display.

#### Actual Behavior

It does.

#### Environment

- Angular: 10.0.1
- CDK/Material: Material
- Browser(s): Chrome 84.0
- Operating System (e.g. Windows, macOS, Ubuntu): gLinux

Contributor guide

Open the contributing guide

Research direction

Start with the reproduction at https://material.angular.io/components/tooltip/overview and compare memory snapshots while repeatedly moving the cursor over elements with hover tooltips. Investigate the matTooltip behavior involved in toggling display, using the earlier report in #12644 as context. Done means repeated tooltip toggling no longer produces an indefinite upward trend in memory usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.