简体   繁体   中英

What does the Chrome JavaScript CPU profiler do that could affect a program's performance (during the profile)?

I've recently managed to introduce a bug into my script which causes the physics frame rate to drop from 100fps to 10fps every now and then (it's a physics simulation type app).

I've been trying to find the cause for quite a while now and have stumbled upon a wierd phenomena: When the frame rate drops to 10fps, if I run Chrome's CPU profiler, it jumps back up to 100fps, and stays there even after I stop the profiler.

So I've been playing around with the profiler and it seems like it disables conditional break-points while it is running - which speed up performance. After making sure to remove all breakpoints, clear my cache and restart the chrome process, I'm sure that breakpoints have nothing to do with it.

So what I would like to know is: Does chrome do anything else which could be affecting (especially increasing ) the performance of my app while the profiler is running?

I want to keep this question general so that it can help people who have similar, but not identical problems, but I should note that I am running my physics in a webworker thread, and this worker thread is the one which experiences the wierd frame rate issues.

Thanks!

EDIT: I'm pretty sure this has something to do with the communication between the threads, not sompletely sure though.

We noticed considerable performance degradation when DevTools are open. The problem appeared about 2-3 months ago. With DevTools open our QUnit tests start very slowly. The page just hanged for several seconds before tests are starting to go. We have rather big application with about 10Mb of JavaScript and dependencies. I suppose that you may have faced a similar problem.

Here is a list of active Chromium issues (it's an open source base for the Chrome browser): https://code.google.com/p/chromium/issues/list By searching for "devtools performance" it gives me several screens of issues.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM