Javascript memory profiler for Firefox

后端 未结 5 872
余生分开走
余生分开走 2020-11-29 00:05

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\'

相关标签:
5条回答
  • 2020-11-29 00:52

    Try also about:memory which shows how much memory each window occupies and how much of it is dedicated to JS objects. It gives high level summary without per object usage, but it is a good starting point for investigating memory requirements of a site.

    0 讨论(0)
  • 2020-11-29 00:54

    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

    and:

    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

    0 讨论(0)
  • 2020-11-29 00:54

    See the source. Sparse arrays don't take up lots of memory, but if your colleague doesn't need any Array functionality, he should be using plain Objects anyway.

    0 讨论(0)
  • 2020-11-29 01:04

    I think JavaScript Memory Validator from Software Verification Limited can help you, it has allocations view, objects view, generations view, etc. It's not free but you can use the evaluation version to check your coworker's code. They also have a Performance and Coverage Validators...

    0 讨论(0)
  • 2020-11-29 01:07

    You can use Mozilla’s Developer Tools. In order to use advanced developer tools of Firefox you need to create a debug build instead of a release build. For more on building process, see the page. Also, more information about using Mozilla’s Developer Tools you can find in this paper.

    0 讨论(0)
提交回复
热议问题