调试和分析web worker [英] Debugging and profiling web workers

查看:91
本文介绍了调试和分析web worker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行计算,例如网络工作者的路径查找这可能需要几秒钟,我想优化它。 Chrome的代码似乎比现在的代码快了约3倍,但是花费了多少时间,或者为什么我没有洞察力。



通常,你如何调试网络工作者?



您如何配置网络工作者?



(Firefox和Chrome)

解决方案

在Chrome中,您可以在Sources> Workers中打开网络工作者源,并获得prifile的完整界面。
在Firefox中进行剖析 - 不知道。
http:// www .nczonline.net / blog / 2009/08/25 / web-workers-errors-and-debugging /


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)

解决方案

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/

这篇关于调试和分析web worker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆