如何在Chrome中分析网络工作者? [英] How to profile web workers in Chrome?

查看:133
本文介绍了如何在Chrome中分析网络工作者?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道一种简单的方法来在Chrome中分析Web工作人员?我从去年发现了这个问题,但不幸的是,唯一提供的答案不起作用。



有没有办法做到这一点,还是我只是看看?这似乎是一个相当大的疏忽,如果你甚至不能进行性能分析,它会阻碍Web开发。

解析方案

到开发者工具 - >来源 - >工作者,并启用复选框暂停开始。现在,当您刷新页面时,将出现一个带有每个工人检查员的弹出窗口。

在检查器窗口中,导航到配置文件选项卡并开始分析。现在您必须切换回Sources选项卡并单击右上方图标栏上的Resume script executed图标。



这种方法是不适用于某些较旧的Chrome版本(Chrome 33及更低版本,请比较 Chromium Issue 180377 ) - 那里的检查窗口保持空白,除了在地址栏中有一个URL。在Chrome 35中,它正在为我工​​作。


Does anyone know an easy way to profile web workers in Chrome? I found this question from last year, but unfortunately the only provided answer didn't work.

Is there any way to do this or am I just out of look? It seems like a rather large oversight that hinders web development if you can't even do profiling.

解决方案

To profile Web Workers navigate to "Developer Tools -> Sources -> Workers" and enable the checkbox "Pause on start". Now, when you refresh the page, a popup window with an inspector for each worker will appear.

In the inspector window navigate to the "Profiles" tab and start your profiling. Now you have to switch back to the "Sources" tab and click the "Resume script executing" icon on the right-top icon bar.

This approach is not working for some older Chrome versions (Chrome 33 and below, compare Chromium Issue 180377) - there the inspector windows stay blank, except having a URL in the address bar. In Chrome 35 it is working for me.

这篇关于如何在Chrome中分析网络工作者?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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