2

I've been using Firebug to profile a javascript elastic particle simulation. My most recent change was to move the simulation code to a worker thread separating it from rendering code.

However, Firebug doesn't yet support profiling for Worker threads. (bugs #507783 and #560314)

Are there any javascript profiling libraries that work with web workers?

How should I profile my code?

AnnanFay
  • 9,573
  • 15
  • 63
  • 86
  • this thread should help: http://stackoverflow.com/questions/2323778/how-to-debug-web-workers – kennypu Dec 15 '12 at 02:33
  • but to answer your question, you can't yet profile web workers using fire bug, but you can using chrome – kennypu Dec 15 '12 at 02:34
  • @kennypu Are you sure it supports profilling as well as debugging? I just tried it with no luck. – AnnanFay Dec 15 '12 at 04:56

1 Answers1

1

I strongly recommand the Chrome Developper Tool on google chrome (CTRL+SHIFT+J).

In the "Source" Tab, the last option of the right panel is "Web Workers". You can set it to automatically pause on start, and open a dedicated inspector for the worker. Then, you can reload the page if you need to restart the worker.

A dedicated window will pop (another instance of the chrome dev tools) for the web worker. You can go to the profile tab and profile your web worker code.

I don't thing that firebug have such an option yet.

Sebastien
  • 682
  • 1
  • 14
  • 26