admin管理员组

文章数量:1402274

I have a page which always get stuck only in chrome and safari. The page loads just fine and then gets to 25% CPU (of 4 cores - so 100% if you like). It never crashes but stays unresponsive. Safari actually says that there is an unresponsive script. I have put debug alerts on all my startup code and the code runs just fine. I have "waiting for www..." message that won't go away. How can I know what is running right now? Is there a way to "dump" the current javascript stack, even if the tab is unresponsive?

I can't send a link because the site is not ready for the general public just yet, so if you can help with a general solution or any way to diagnose the problem, I would appreciate it very much.

Another strange thing, the unresponsive page loads just fine where running locally.

Any help will be appreciated.

I have a page which always get stuck only in chrome and safari. The page loads just fine and then gets to 25% CPU (of 4 cores - so 100% if you like). It never crashes but stays unresponsive. Safari actually says that there is an unresponsive script. I have put debug alerts on all my startup code and the code runs just fine. I have "waiting for www..." message that won't go away. How can I know what is running right now? Is there a way to "dump" the current javascript stack, even if the tab is unresponsive?

I can't send a link because the site is not ready for the general public just yet, so if you can help with a general solution or any way to diagnose the problem, I would appreciate it very much.

Another strange thing, the unresponsive page loads just fine where running locally.

Any help will be appreciated.

Share Improve this question edited Jun 2, 2014 at 15:38 Aaron Butacov 34.5k8 gold badges48 silver badges62 bronze badges asked May 24, 2011 at 21:36 SoniaSonia 1,0542 gold badges13 silver badges22 bronze badges 2
  • 1 Well, can you give us the page? Or are we supposed to figure that out blindly? – Blender Commented May 24, 2011 at 21:39
  • Compare the access logs between your local dev platform and the live server. Possibly there's some kind of infinite loop occuring. – Marc B Commented May 24, 2011 at 21:41
Add a ment  | 

1 Answer 1

Reset to default 7

You can use the webkit profiler to find out where it starts to chug. Open up the developer tools (mand + alt + i on my mac, also accessible via the wrench icon on the upper right of chrome), go to the Profiles tab, and click the solid black circle on the bottom left. Do the thing that causes the slowdown, and then click the solid black circle again. The solid black circle is a 'start recording'/'end recording'. You can then see which js functions are taking the most time. You can also get heap snapshots, so you can see all the js objects that are being created. Very useful.

本文标签: javascriptChrome Unresponsive DebugStack Overflow