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

Have live collections being updated by signals, not by traversing node tree #1916

Closed
brunoabinader opened this issue Mar 14, 2014 · 1 comment
Labels
A-content/dom Interacting with the DOM from web content

Comments

@brunoabinader
Copy link
Contributor

Currently, NodeList relies on traversing the root node's children tree each times it needs to gather some information (i.e. item(index), or length()). This is also the case for HTMLCollection.

By using signals to inform collections whenever a node state change occurs (i.e. attribute change, node append/remove/clone/etc), we can then achieve O(n) for most operations.

bors-servo pushed 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 pushed 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 pushed 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 pushed 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 pushed 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
Contributor

Fixed by #8227.

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
Labels
A-content/dom Interacting with the DOM from web content
Projects
None yet
Development

No branches or pull requests

3 participants