开发者

browser (javascript) resource problems

I've lately been running into odd issues, which I'm starting to think are related to resource starvation in the browser.

In FF: I'd been testing one of our web apps and suddenly things that should disappear after a couple seconds stopped disappearing. I tracked back to setTimeout just flat out refusing to开发者_Go百科 work. After reloading the browser it was all clear, no issues.

In IE: I regularly see issues where IE will refuse to do transparency all the sudden, simply reloading the page clears this up.

In both: Though I can't say its related for sure, I see unexplainable behavior, things along the lines of variables not being available (undefined) when they should be. Both browsers also show a steady increase in memory usage over time (memory leaks).

The javascript in the web app is heavy and it is a single load page (making those memory issues mentioned all the more painful). There are lots of in-efficiency, and various things that make one say "why would you do that?".

Has anyone encountered such things? Can you point out general resources that will help identify and resolve these issues?


You could try running your application against the Chrome Profiler http://code.google.com/chrome/devtools/docs/overview.html. You can profile the CPU and get snapshots of the browser heap, that should help locate any rogue stuff.


If your application is designed to work with the Internet Explorer: The Developer Toolbar also has a profiler.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜