Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Issue 2243463002: Make ChromeVox navigation 100x faster on some sites. (Closed)

Created:
4 years, 4 months ago by David Tseng
Modified:
4 years, 4 months ago
Reviewers:
nektarios, dmazzoni
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make ChromeVox navigation 100x faster on some sites. It turns out that there is a very tangible cost to context switching into and out of V8 as was advised by others in the past. Since the major native rewrite of automation into C++, there hasn't been a good illustration of the actual perf implications until now. The issue. The current implementation of AutomationNode.children makes a call to native to fetch child id's per child. On a large site, where a node has many children, this adds up quickly. Since the actual js objects are created on the initial node data event, it's not js object creation causing any perf issues. The data On a site like blindcooltech.com: there are about 4000 children of the root in the automation tree. root.children takes around 60 ms. Next/previous sibling calls to any child of root takes around 100 ms. This results in a significant lag when navigating the site and things like incremental search take about a few minutes to find a text match. Mitigation Since ChromeVox rarely needs to ask for children, we are fine with using next/previous sibling. The previous impl of sibling traversal relies upon asking for the parent's children. This cl changes it so we directly ask the native bindings for the child id at index. With this change, next/previous sibling calls take about 0 ms. BUG=636954 Committed: https://crrev.com/6247dd22f8cc3628271a6ca5e818042c73772714 Cr-Commit-Position: refs/heads/master@{#411412}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -6 lines) Patch
M chrome/renderer/resources/extensions/automation/automation_node.js View 1 chunk +10 lines, -6 lines 0 comments Download

Messages

Total messages: 17 (10 generated)
David Tseng
4 years, 4 months ago (2016-08-11 16:06:31 UTC) #4
David Tseng
+ nektar. Nektarios, Dominic's ooo, can you have a look? It's pretty short and should ...
4 years, 4 months ago (2016-08-11 18:47:02 UTC) #6
dmazzoni
lgtm Neat! Any other calls to children() we could optimize?
4 years, 4 months ago (2016-08-11 19:09:46 UTC) #9
nektarios
lgtm
4 years, 4 months ago (2016-08-11 19:17:54 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2243463002/1
4 years, 4 months ago (2016-08-11 19:23:52 UTC) #12
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 4 months ago (2016-08-11 20:08:32 UTC) #14
commit-bot: I haz the power
4 years, 4 months ago (2016-08-11 20:10:14 UTC) #16
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/6247dd22f8cc3628271a6ca5e818042c73772714
Cr-Commit-Position: refs/heads/master@{#411412}

Powered by Google App Engine
This is Rietveld 408576698