Update selectors crate to 0.25, and enables :has and :is selectors.#65
Update selectors crate to 0.25, and enables :has and :is selectors.#65Lymia wants to merge 7 commits into
selectors crate to 0.25, and enables :has and :is selectors.#65Conversation
|
Thanks! I don't see any benchmarks. Do you have numbers for how much the selector cache helps? |
|
I don't and it might take some thought as to how to construct one. From what I understand, it only matters for selectors that contain |
|
Running on an AMD Framework 13 with a Ryzen 7 7840U: Strangely, I'm observing that the cache increases performance for even selectors that shouldn't need to use the cache. I tested with LTO turned on, and that didn't help, so it's not some inlining-related issue. I'm not sure why. |
|
Thanks for adding benchmarks! Seems like a modest speed up for the expected cases? I'm just trying to balance this against the scary warning about crossing the streams with |
|
|
||
| [dev-dependencies] | ||
| tempfile = "3" | ||
| criterion = { version = "0.4", features = ["html_reports"] } |
There was a problem hiding this comment.
version 0.5 please, to avoid cargo audit warnings.
Now that I think about it and reading through the code, I don't think it's accurate. The only time it'll cause errors if you mutate a node such that it is still the same I'll edit the documentation to be more specific. |
|
After looking at the generated assembly, I think I do have a satisfying explanation for why the cache helps even when |
|
There is also an active fork of I'm investigating it right now too. This would go all the way to cssparser 0.33 Edit: It'd be a LOT more work, because |
|
Any update on this PR? The current version should have all the reviews addressed. |
|
Thanks for you patience. I'm away this week, but will follow up when I get back. |
|
@Lymia Unfortunately I'm not longer with Brave, so I won't be able to merge this. Hopefully someone else will take over maintenance. |
|
@antonok-edm Hope you don't mind the tag. You appear to be working on other Rust projects within brave. Any chance we can get this (and some of the other dependency updates) merged? Thank you 🙏 |
|
@thomaseizinger not sure if you're aware, but just to make sure - we do have separate Anyways, with regards to this PR and increasing the |
There are no plans to use releases based off the |
No, I wasn't aware, sorry! I came here because My goal is to deduplicate (and eliminate outdated) dependencies across my dependency tree and this is one of them :) A new release to crates.io would be much appreciated once the dependency bumps are in. Let me know if I can help prepare that! Edit: As far as I can tell from the diff, this bump is a non-breaking change and can therefore be a patch-release? That would be awesome as I can then update right away :) |
|
It's a breaking change in a single place, unfortunately. Plus, 0.25 is no longer the latest |
Ah I see, it is the field added to the iterator, right? In that case, could we split this from the dependency bump and release a patch version with just that? I am happy to help in preparing PRs etc to make that possible. |
This is a (very minor) breaking change to the API because it adds a new field to the
Selectiterator in order to add caching for:nth-child.If this is not wanted, don't pull the last commit
da1d495407d5e8b5801172e1061db528fe9e0ffa.