bug(tooltip): matTooltip leaks memory
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
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
贡献指南
调研方向
从 https://material.angular.io/components/tooltip/overview 中的复现开始,在反复将光标移到带有 hover tooltip 的元素上时比较内存快照。以 #12644 中较早的报告作为背景,调查涉及显示切换的 matTooltip 行为。当反复切换 tooltip 不再导致内存使用量呈无限上升趋势时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend, performance
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100