-
Notifications
You must be signed in to change notification settings - Fork 596
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
exposing the content-type parser? #1891
Comments
... and unlike FileReader, is actually relevant to an http client. It's low maintenance and isn't affected by node's release schedule (it's much easier to update undici to a newer version than a newer node version if a bug appears in either parser). |
It is also important to highlight that some adjustments can be made to Node compared to Undici's implementation. As, e.g., the |
collectASequenceOfCodePoints could probably be replaced with indexOf and slice, unsure if it would be faster |
I think replacing node mime parser with undici's is a decision better taken in the Node.js repo. |
I don't think it needs to be replaced, I'm wondering if undici should export it as an alternative to node's. |
Definitely!! |
As shared in your PR, it definitely is. Didn't make that comparison within Undici but was able to come to the same conclusion by running external benchmarks comparing Big step forward exposing the util 🚀 |
Since undici's parser consistently outperforms node's, should we consider exposing it? It already passes the entirety of the mimesniff tests.
Originally posted by @KhafraDev in nodejs/performance#38 (comment)
The text was updated successfully, but these errors were encountered: