用于 Firefox 的 Javascript 内存分析器 [英] Javascript memory profiler for Firefox

查看:26
本文介绍了用于 Firefox 的 Javascript 内存分析器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有用于 Firefox 的工具/插件/功能可以转储您在页面/脚本中创建的 Javascript 对象的内存使用情况?我知道 Firebug 的分析器,但我想要的不仅仅是几次.类似于 Yourkit 用于内存使用的 Java 分析的东西.

Is there a tool/plugin/function for Firefox that'll dump out a memory usage of Javascript objects that you create in a page/script? I know about Firebug's profiler but I'd like something more than just times. Something akin to what Yourkit has for Java profiling of memory usage.

原因是一位同事在数组中使用 id 作为键",并在他这样做时创建了 1000 个空槽.他认为这是无害的,而我的意见不同.我想提供一些证据来证明我是否正确.

Reason is that a co-worker is using id's for "keys" in an array and is creating 1000's of empty slots when he does this. He's of the opinion that this is harmless whereas my opinion differs. I'd like to offer some proof to prove whether I'm right or not.

推荐答案

我还没有尝试过软件验证工具,但 Mozilla 有一些工具可以跟踪 firefox 消耗的整体内存以阻止泄漏:

I haven't tried the Sofware verify tools, but Mozilla has tools that track overall memory consumed by firefox for the purpose of stemming leaks:

http://www.mozilla.org/performance/tools.html

和:

https://wiki.mozilla.org/Performance:Leak_Tools

还有这个家伙说在闭包的上下文中避免使用大数组,朝向文章底部

There's also this guy saying to avoid large arrays in the context of closures, towards article bottom

http://ajax.sys-con.com/node/352585

这篇关于用于 Firefox 的 Javascript 内存分析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆