Memory - Firefox Developer Tools 编辑
The Memory tool lets you take a snapshot of the current tab's memory heap. It then provides a number of views of the heap that can show you which objects account for memory usage and exactly where in your code you are allocating memory.
The basics
- Opening the memory tool
- Taking a heap snapshot
- Comparing two snapshots
- Deleting snapshots
- Saving and loading snapshots
- Recording call stacks
Analyzing snapshots
The Tree map view is new in Firefox 48, and the Dominators view is new in Firefox 46.
Once you've taken a snapshot, there are three main views the Memory tool provides:
- the Tree map view shows memory usage as a treemap.
- the Aggregate view shows memory usage as a table of allocated types.
- the Dominators view shows the "retained size" of objects: that is, the size of objects plus the size of other objects that they keep alive through references.
If you've opted to record allocation stacks for the snapshot, the Aggregate and Dominators views can show you exactly where in your code allocations are happening.
Concepts
Example pages
Examples used in the Memory tool documentation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论