Repository navigation
Idea: Parsec, a Rust HTML parser, as a selectolax backend #231
jamesconwaydev
started this conversation in
Ideas
Replies: 1 comment
|
A quick follow-up, since I promised numbers and you shouldn't have to take my word for it. The head-to-head is in now.
It doesn't win everywhere, and I'd rather you heard that from me. Two of the eight hostile inputs still go Lexbor's way, both piles of reopened formatting tags (parsec#68, being worked on now). The other way round, 80,000 unclosed The method, every number and how to run it yourself are on the Benchmarks wiki page. If a selectolax backend is ever interesting, the C API and Python bindings are next on the roadmap, and I'm still happy to shape them around what you'd need. James |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi! An idea for selectolax: try Parsec as a parser backend.
Some background. I was using Lexbor in my scraper, and it served me well, but I have a bit of a Ricky Bobby complex: I wanna go fast. So I wrote my own HTML parser in Rust. It turned out quick enough that I've pulled it out of the scraper and made it its own open-source project, so everyone can use it.
Where it stands today:
:has(),:is(),:where(),:not()with lists,:nth-child(... of S)and:scope.unsafeblock, and documents you can share across threads.It isn't on crates.io yet. Next up are a C API and Python bindings, which are probably the parts that matter to selectolax. They're on the roadmap. If selectolax would want a second backend, I'd love to hear what you'd need from it, and I'm happy to shape the C API or Python side around it.
Docs are on the wiki, including a comparison with Lexbor.
Thanks for selectolax, by the way. It's how a lot of people first meet Lexbor, me included.
James
All reactions