为什么启用 Firebug 后会出现内存泄漏?
我有几个使用 Highcharts 创建的图表。这些是实时图表。为了定期更新这些图表,我将 Primefaces 的 RemoteCommand
组件与递归 setTimout
结合使用。
现在,如果我关闭 firebug 并加载页面,内存使用量将保持在 105MB 左右。但是如果我让 firebug 打开并加载页面,那么内存使用量就会不断增加。只需大约 10 分钟即可达到 500MB。
起初我以为问题出在 Highcharts、Primefaces 或我自己的代码上。但现在我知道这是因为萤火虫。
为什么当萤火虫打开时会发生这种情况?
I have a couple of charts that I created using Highcharts. These are live charts. And to update these charts regularly I am using Primefaces' RemoteCommand
components with recursive setTimout
.
Now, if I turn firebug off and load the page, the memory usage stays around 105MB. But if I leave firebug on and load the page, then the memory usage keeps increasing. It reaches 500MB in just about 10 minutes.
At first I was thinking that the problem was either with Highcharts, Primefaces, or my own code. But now I know that it's because of firebug.
Why does it happen when the firebug is on?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
“网络”选项卡因引入内存泄漏而臭名昭著。尝试禁用它。您可能会看到改进。
The Net tab has been notorious for introducing memory leaks. Try disabling it. You may see an improvement.
它可能不会泄漏内存,但它只是消耗了大量资源。它是用 JavaScript 编写的,因此您不能指望这里有很高的性能。它将自身注入 Firefox 以提供附加功能。站点越大(就客户端代码和复杂性而言),Firebug 的占用空间就越大。
It's probably not leaking memory, but it's just consuming a lot of resources. It's written in JavaScript, so you can't expect quite of performance here. It injects itself into Firefox to provide additional functionality. The larger the site (in terms of client-side code and complexity), the larger Firebug's footprint gets.