Hi Martin, this is a known fact. Performance critical code usually get a second treatment with the optimizing compiler after it has been run for a short while. When a breakpoint is set inside a function, it is deoptimized to enable breaking and debugging. This can have a big performance impact. This is a conscious design decision: we do not require code that is being debugged to run fast.
However, if you can provide a pure javascript (running on V8's dev shell, D8, alone) sample, I can take a look and see if there is something unusual going on. Regards, Yang On Mon, Jun 11, 2012 at 11:09 PM, Martin <[email protected]> wrote: > Hello, > > the following applies to both Chrome 19.0.1084.52 m using the > Developer Tools and Node.js 0.7.6 pre using node-inspector as Debug > Frontend. > I've noticed that setting a breakpoint (in frequently executed code), > no matter if the breakpoint is conditional or not slows down the > execution of javascript significally. > The function i'm trying to debug takes around 2 seconds to execute > without breakpoints. > If i set a breakpoint i stopped waiting for the end of execution (or > actually hitting the breakpoint) after 10 minutes! > Is this a known issue? > I haven't found anything related in the issue tracker. > > Recently i debugged a webworker, setting a breakpoint in a function > which was not executed at all, but the behaviour was the same: > javascript execution slowed down alot. > > kind regards > Martin > > -- > v8-dev mailing list > [email protected] > http://groups.google.com/group/v8-dev > -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
