3 ms·
If you're seeing miserable performance in everything other than Chrome, something is probably wrong with your Javascript, or you're doing something that is only
by kevingadd 13y ago
If you're seeing miserable performance in everything other than Chrome, something is probably wrong with your Javascript, or you're doing something that is only optimized in Chrome.
Given that you said web workers, are you transferring a lot of data between the worker and the document? Web worker transfers are pretty expensive, so it's possible you're seeing the effect of Chrome having a faster implementation.
Does your JS generate a lot of garbage, and cause GC pressure? Chrome's collector handles garbage better than Firefox because it's generational, but getting rid of GC pressure can improve performance everywhere.
I feel your pain about the difficulty of profiling web workers, though. Profiling browsers in general is a pain but it seems like none of the dev tools people on any browser actually bother to make tools work with web workers.
In FF I strongly recommend using the SPS Profiler because it will give you incredibly detailed performance data; however I don't know if it works with web workers either: https://developer.mozilla.org/en-US/docs/Performance/Profiling_with_the_Built-in_Profiler https://developer.mozilla.org/en-US/docs/Performance/Profili...
My list of JS perf gotchas might contain one or two helpful details for you as well: https://github.com/kevingadd/JSIL/wiki/JavaScript-Performance-For-Madmen https://github.com/kevingadd/JSIL/wiki/JavaScript-Performanc...
- willvarfar 13y agolovely site! thx for your link