Javascript内存使用&在Chrome / Firefox(Minefield)中进行调试 [英] Javascript Memory Usage & Debugging in Chrome / Firefox (Minefield)

查看:122
本文介绍了Javascript内存使用&在Chrome / Firefox(Minefield)中进行调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用Google O3D WebGL框架开发应用程序,这是我第一次如此集中地使用JavaScript。功能只有大约20%完成,但是自己的应用程序自己开始占用大约160兆的内存,而运行它的应用程序在Chrome中消耗大约200kb每秒,FF中为2meg;当屏幕刷新。当我写这个我已经离开Chrome 9运行,它刚刚达到400兆内存使用。我现在特别喜欢FF的用法,我正在寻找任何关于优化JavaScript的真正好的文档,防止内存泄漏,这将有助于我基本解决这些问题。我也会非常感谢任何可以帮助我的真棒工具的链接。感谢提前。

I am currently developing an application using Google O3D WebGL framework, and this is the first time I am using JavaScript so intensively. The features are only around 20% complete, but already the application on its own starts off by taking up around 160 meg of memory, whilst leaving the application running it consumes around 200kb per second in Chrome, 2meg in FF; as the screen is refreshed. As I am writing this I have left Chrome 9 running and it has just hit 400 meg of memory usage. I am now crapping myself especially with FF's usage, and I am looking for any really good documentation on optimizing JavaScript, preventing memory leaks, anything that will help me tackle this basically. I would also really appreciate any links to awesome tools that will help me. Thanks in advance.

编辑:我遇到过 Mozilla演示工具,但我需要一些简单易用的东西,最好用GUI,或至少一个noob友好的指南。还有很多这些工具是用于linux(我正在使用Win7)或需要购买/只是命令行。 +我真的很想看看Chrome的东西:),但我会接受提供最有用的信息的答案。

I have come across Mozilla performance tools but I need something simple to use, preferably with a GUI, or at least a noob friendly guide. Also a lot of those tools are for linux (I am using Win7) or require purchase / are command line only. + I would really like to see something for Chrome :) but I will accept the answer that provides the most usefull information.

编辑:Google Chrome的开发者工具只报告10meg的内存使用情况,不知道其余的来自哪里。

Google Chrome's developer tools only report on 10meg of memory usage, unsure where the rest is coming from.

推荐答案

你有机会查看 Speed Tracer ?这应该会给你更多的需要我想的。

Have you had a chance to check out Speed Tracer yet? That should give you more of what you need I think.

有了内存使用,你可能想在Chrome开发人员工具的配置文件选项卡下做一个堆配置文件。您可以比较多个堆配置文件以查看内存使用情况。

With memory usage, you probably want to do a heap profile in the Chrome developer tools under the "Profiles" tab. You can compare multiple heap profiles to get a look at memory usage.

这篇关于Javascript内存使用&在Chrome / Firefox(Minefield)中进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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