I've built an application that wastes 40% of its time collecting garbage, and I'm at my wits' end trying to find out where it is coming from. I've corralled any possible problems in my own code, yet it persists. I'm beginning to suspect some third party code of being the problem, and I'd like to know if I can somehow track down what is being garbage collected. If there's a Chrome-specific answer, that'd be great, but I'll take anything at this point.
我已经构建了一个应用程序,它浪费了40%的时间来收集垃圾,我绞尽脑汁试图找出垃圾的来源。我已经在我自己的代码中处理了所有可能的问题,但它仍然存在。我开始怀疑是第三方代码出了问题,我想知道我是否能以某种方式找到正在收集的垃圾。如果有一个特定于颜色的答案,那就太好了,但我在这一点上什么都讲。
2 个解决方案
#1
2
In Chrome I would start with following:
在Chrome中,我将从以下几个方面开始:
- DevTools > Profile
- DevTools >概要
- Take Heap Snapshot
- 花堆快照
- Working with the application
- 使用应用程序
- Take Heap Snapshot again
- 再把堆快照
- Inspect the second snapshot in the comparision mode
- 在比较模式中检查第二个快照
Following links may be useful:
以下连结可能有用:
- http://addyosmani.com/blog/performance-optimisation-with-timeline-profiles/
- http://addyosmani.com/blog/performance-optimisation-with-timeline-profiles/
- http://rein.pk/using-the-heap-profiler-in-chrome-dev-tools/
- http://rein.pk/using-the-heap-profiler-in-chrome-dev-tools/
#2
0
Perhaps you could try Chrome's Heap Profiler?
也许你可以试试Chrome的堆分析器?
Also, related questions to Javascript Heap profiling:
另外,关于Javascript堆分析的相关问题:
- Chrome HTML Page Memory Usage
- Chrome HTML页面内存使用
- Forcing garbage collection in Google Chrome
- 强制垃圾收集在谷歌Chrome
#1
2
In Chrome I would start with following:
在Chrome中,我将从以下几个方面开始:
- DevTools > Profile
- DevTools >概要
- Take Heap Snapshot
- 花堆快照
- Working with the application
- 使用应用程序
- Take Heap Snapshot again
- 再把堆快照
- Inspect the second snapshot in the comparision mode
- 在比较模式中检查第二个快照
Following links may be useful:
以下连结可能有用:
- http://addyosmani.com/blog/performance-optimisation-with-timeline-profiles/
- http://addyosmani.com/blog/performance-optimisation-with-timeline-profiles/
- http://rein.pk/using-the-heap-profiler-in-chrome-dev-tools/
- http://rein.pk/using-the-heap-profiler-in-chrome-dev-tools/
#2
0
Perhaps you could try Chrome's Heap Profiler?
也许你可以试试Chrome的堆分析器?
Also, related questions to Javascript Heap profiling:
另外,关于Javascript堆分析的相关问题:
- Chrome HTML Page Memory Usage
- Chrome HTML页面内存使用
- Forcing garbage collection in Google Chrome
- 强制垃圾收集在谷歌Chrome