8

I am running computations e.g. path-finding in web workers. This can take several seconds and I want to optimise it. Chrome seems to be about 3x faster for my current code, but where the time is spent or why I have no insight into.

Generally, how can you debug web workers?

How can you profile web workers?

(Firefox and Chrome)

Will
  • 73,905
  • 40
  • 169
  • 246

1 Answers1

4

In Chrome you may open web worker source in Sources > Workers and get full interface to prifile. Profiling in Firefox - no idea. And http://www.nczonline.net/blog/2009/08/25/web-workers-errors-and-debugging/

3y3
  • 802
  • 1
  • 6
  • 18
  • I believe what Chrome does is run the worker in an iframe, meaning it runs inside your main thread effectively. This skews profiling. – Will May 01 '13 at 21:58
  • For a working description on Web Worker profiling see http://stackoverflow.com/questions/22511158/how-to-profile-web-workers-in-chrome/24785355#24785355 – david Jul 16 '14 at 17:44