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
Consider precomputing Element#tagName. #1471
Comments
Computing tag_name is slow, actually. We want to be storing both, probably in something like Gecko's shared nodeinfo structs. |
#854 is relevant, in that case. |
Pretty sure Node.name and Node.local_name cover this. |
I can't read. We now store Element.local_name and compute the tag name. |
If this is still something we want to fix, it would involve taking the logic from Element::TagName and performing it when the element is created (for example in |
Note that the computed value needs to be updated if the owner document changes. |
Right. I really do think the way Gecko does this (with a shared nodeinfo struct) is pretty good, I don't know to what extent the sharing would be a problem for Servo... |
Compute tag_name a maximum of once per document owner Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy --faster` does not report any errors - [X] These changes fix #1471 (github issue number if applicable). Either: - [X] These changes do not require tests because no new functionality was added, just a reorganization and caching of existing functionality Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11318) <!-- Reviewable:end -->
Compute tag_name a maximum of once per document owner Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: - [x] `./mach build -d` does not report any errors - [X] `./mach test-tidy --faster` does not report any errors - [X] These changes fix #1471 (github issue number if applicable). Either: - [X] These changes do not require tests because no new functionality was added, just a reorganization and caching of existing functionality Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11318) <!-- Reviewable:end -->
Compute tag_name a maximum of once per document owner Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: - [x] `./mach build -d` does not report any errors - [X] `./mach test-tidy --faster` does not report any errors - [X] These changes fix #1471 (github issue number if applicable). Either: - [X] These changes do not require tests because no new functionality was added, just a reorganization and caching of existing functionality Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11318) <!-- Reviewable:end -->
According to jgraham:
It looks like someone didn't finish the namespace implementation for elements
At the moment they store something called tag_name
But they should store local_name and tag_name should be computed
The text was updated successfully, but these errors were encountered: