Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTMLCollection::Item() is very slow on large pages. #3381

Closed
glennw opened this issue Sep 17, 2014 · 3 comments
Closed

HTMLCollection::Item() is very slow on large pages. #3381

glennw opened this issue Sep 17, 2014 · 3 comments

Comments

@glennw
Copy link
Member

@glennw glennw commented Sep 17, 2014

This is due to Live collections having to traverse the tree every time when indexing an element.

Other browsers have a special cache implementation to make this code path faster.

@brunoabinader
Copy link
Contributor

@brunoabinader brunoabinader commented Oct 23, 2014

Issue #1916 should address that. However, I'm having difficulties in implementing a list of node observers. Main issue is having a way to safely store pointers of HTMLCollection and NodeList (encapsulated as NodeObserver traits).

bors-servo added a commit that referenced this issue Oct 30, 2015
Versioned dom

This PR adds versioning to the DOM. There are now node.get_version and node.get_descendent_version methods that return a counter that is bumped when the node is dirtied. This is used to implement cache invalidation for caching HTMLCollection state. Caching HTMCollections gets a 1000x speedup in the Dromaeo DOM query tests.

Addresses #6901, #3381 and #1916.

Replaces PR #6927.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8227)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Nov 5, 2015
Versioned dom

This PR adds versioning to the DOM. There are now node.get_version and node.get_descendent_version methods that return a counter that is bumped when the node is dirtied. This is used to implement cache invalidation for caching HTMLCollection state. Caching HTMCollections gets a 1000x speedup in the Dromaeo DOM query tests.

Addresses #6901, #3381 and #1916.

Replaces PR #6927.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8227)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Nov 6, 2015
Versioned dom

This PR adds versioning to the DOM. There are now node.get_version and node.get_descendent_version methods that return a counter that is bumped when the node is dirtied. This is used to implement cache invalidation for caching HTMLCollection state. Caching HTMCollections gets a 1000x speedup in the Dromaeo DOM query tests.

Addresses #6901, #3381 and #1916.

Replaces PR #6927.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8227)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Nov 9, 2015
Versioned dom

This PR adds versioning to the DOM. There are now node.get_version and node.get_descendent_version methods that return a counter that is bumped when the node is dirtied. This is used to implement cache invalidation for caching HTMLCollection state. Caching HTMCollections gets a 1000x speedup in the Dromaeo DOM query tests.

Addresses #6901, #3381 and #1916.

Replaces PR #6927.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8227)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Nov 9, 2015
Versioned dom

This PR adds versioning to the DOM. There are now node.get_version and node.get_descendent_version methods that return a counter that is bumped when the node is dirtied. This is used to implement cache invalidation for caching HTMLCollection state. Caching HTMCollections gets a 1000x speedup in the Dromaeo DOM query tests.

Addresses #6901, #3381 and #1916.

Replaces PR #6927.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8227)
<!-- Reviewable:end -->
@KiChjang
Copy link
Member

@KiChjang KiChjang commented Nov 29, 2015

Fixed by #8227.

@KiChjang KiChjang closed this Nov 29, 2015
jrmuizel pushed a commit to jrmuizel/gecko-cinnabar that referenced this issue Jun 12, 2017
…=eefriedman

This PR adds versioning to the DOM. There are now node.get_version and node.get_descendent_version methods that return a counter that is bumped when the node is dirtied. This is used to implement cache invalidation for caching HTMLCollection state. Caching HTMCollections gets a 1000x speedup in the Dromaeo DOM query tests.

Addresses servo/servo#6901, servo/servo#3381 and servo/servo#1916.

Replaces PR servo/servo#6927.

Source-Repo: https://github.com/servo/servo
Source-Revision: f39faaf99471f5419710e1a3d434e5d5fab0d221
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 1, 2019
…=eefriedman

This PR adds versioning to the DOM. There are now node.get_version and node.get_descendent_version methods that return a counter that is bumped when the node is dirtied. This is used to implement cache invalidation for caching HTMLCollection state. Caching HTMCollections gets a 1000x speedup in the Dromaeo DOM query tests.

Addresses servo/servo#6901, servo/servo#3381 and servo/servo#1916.

Replaces PR servo/servo#6927.

Source-Repo: https://github.com/servo/servo
Source-Revision: f39faaf99471f5419710e1a3d434e5d5fab0d221

UltraBlame original commit: 16812331cb471e13fb9def46bce7aa33e2abda93
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…=eefriedman

This PR adds versioning to the DOM. There are now node.get_version and node.get_descendent_version methods that return a counter that is bumped when the node is dirtied. This is used to implement cache invalidation for caching HTMLCollection state. Caching HTMCollections gets a 1000x speedup in the Dromaeo DOM query tests.

Addresses servo/servo#6901, servo/servo#3381 and servo/servo#1916.

Replaces PR servo/servo#6927.

Source-Repo: https://github.com/servo/servo
Source-Revision: f39faaf99471f5419710e1a3d434e5d5fab0d221

UltraBlame original commit: 16812331cb471e13fb9def46bce7aa33e2abda93
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
…=eefriedman

This PR adds versioning to the DOM. There are now node.get_version and node.get_descendent_version methods that return a counter that is bumped when the node is dirtied. This is used to implement cache invalidation for caching HTMLCollection state. Caching HTMCollections gets a 1000x speedup in the Dromaeo DOM query tests.

Addresses servo/servo#6901, servo/servo#3381 and servo/servo#1916.

Replaces PR servo/servo#6927.

Source-Repo: https://github.com/servo/servo
Source-Revision: f39faaf99471f5419710e1a3d434e5d5fab0d221

UltraBlame original commit: 16812331cb471e13fb9def46bce7aa33e2abda93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.