|
|
Chromium Code Reviews|
Created:
4 years, 4 months ago by David Tseng Modified:
4 years, 4 months ago 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. |
DescriptionMake 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 #
Messages
Total messages: 17 (10 generated)
Description was changed from ========== Make ChromeVox navigation 100x faster on some sites. ========== to ========== 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 several calls to native to fetch child id's. Since the actual js objects are created on the initial node data event, it's not js object creation. The data On a site like blindcooltech.com: there are about 4000 children of the root in the automation tree. root.children takes around 200 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. BUG=636954 ==========
dtseng@chromium.org changed reviewers: + dmazzoni@chromium.org
Description was changed from ========== 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 several calls to native to fetch child id's. Since the actual js objects are created on the initial node data event, it's not js object creation. The data On a site like blindcooltech.com: there are about 4000 children of the root in the automation tree. root.children takes around 200 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. BUG=636954 ========== to ========== 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 several calls to native to fetch child id's. Since the actual js objects are created on the initial node data event, it's not js object creation. The data On a site like blindcooltech.com: there are about 4000 children of the root in the automation tree. root.children takes around 200 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 ==========
dtseng@chromium.org changed reviewers: + nektar@chromium.org
+ nektar. Nektarios, Dominic's ooo, can you have a look? It's pretty short and should be understandable.
Description was changed from ========== 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 several calls to native to fetch child id's. Since the actual js objects are created on the initial node data event, it's not js object creation. The data On a site like blindcooltech.com: there are about 4000 children of the root in the automation tree. root.children takes around 200 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 ========== to ========== 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 several calls to native to fetch child id's. 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 200 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 ==========
Description was changed from ========== 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 several calls to native to fetch child id's. 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 200 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 ========== to ========== 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 several calls to native to fetch child id's. 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 ==========
lgtm Neat! Any other calls to children() we could optimize?
lgtm
The CQ bit was checked by dtseng@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== 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 several calls to native to fetch child id's. 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 ========== to ========== 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 several calls to native to fetch child id's. 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 ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== 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 several calls to native to fetch child id's. 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 ========== to ========== 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 several calls to native to fetch child id's. 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} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/6247dd22f8cc3628271a6ca5e818042c73772714 Cr-Commit-Position: refs/heads/master@{#411412}
Message was sent while issue was closed.
Description was changed from ========== 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 several calls to native to fetch child id's. 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} ========== to ========== 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} ========== |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
