Ash UI Devtool breaks when opening ChromeOS launcher |
||
Issue descriptionWhen trying to use the ash dev tool https://www.chromium.org/developers/how-tos/inspecting-ash It appears that the inspector tool will break whenever the launcher is triggered. Sometimes the overlay won't show, sometimes the devtool won't select the node when pinning a ui element. When the launcher is opening, there is a visible multi-seconds pause on the UI. Looking at the console log, there are thousands of these logs below that flush the screen. [31611:31611:1010/101411.205174:ERROR:http_server.cc(99)] Write buffer is full. [31611:31611:1010/101411.205191:ERROR:http_server.cc(99)] Write buffer is full. [31611:31611:1010/101411.205207:ERROR:http_server.cc(99)] Write buffer is full. [31611:31611:1010/101411.205244:ERROR:http_server.cc(99)] Write buffer is full. Looking at the code, it seems the devtools is sending ui updates to the frontend through http web socket. The http server's buffer is overflowing by too many requests to update. It appears the launcher has many views, a few hundreds, and the current devtool update algorithm is not very efficient, looks like O(n^2) where n is number of views. So it is sending tens of thousands of updates to the frontend all at once, which overflowed the http server buffer. I will take a first stab to see if we can make it fast.
,
Oct 16
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/da1977a39eea2f806fd91e5d63685e6539ed8e7e commit da1977a39eea2f806fd91e5d63685e6539ed8e7e Author: Xiaohui Chen <xiaohuic@google.com> Date: Tue Oct 16 20:13:02 2018 ui_devtools: optimize view tree updating logic Currently when view tree is updating, we visit each view in this subtree and for each view we rebuild the subtree with that view as root and recurse. This causes very complicated view tree, e.g. ChromeOS launcher to flood the HTTP websocket server and overrun the buffer. Now we avoid rebuilding subtree if we already visited it, and only send view tree update on the root view which covers the whole subtree. Bug: 894107 Test: locally build and run devtools with ChromeOS launcher Change-Id: I53c87813729eb4983ce613628ae2b83e86adcd30 Reviewed-on: https://chromium-review.googlesource.com/c/1279357 Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Commit-Queue: Xiaohui Chen <xiaohuic@chromium.org> Cr-Commit-Position: refs/heads/master@{#600094} [modify] https://crrev.com/da1977a39eea2f806fd91e5d63685e6539ed8e7e/components/ui_devtools/dom_agent.cc [modify] https://crrev.com/da1977a39eea2f806fd91e5d63685e6539ed8e7e/components/ui_devtools/dom_agent.h [modify] https://crrev.com/da1977a39eea2f806fd91e5d63685e6539ed8e7e/components/ui_devtools/ui_element.h [modify] https://crrev.com/da1977a39eea2f806fd91e5d63685e6539ed8e7e/components/ui_devtools/views/dom_agent_aura.cc
,
Oct 16
|
||
►
Sign in to add a comment |
||
Comment 1 by sadrul@chromium.org
, Oct 10