Uh oh!
There was an error while loading. Please reload this page.
deps: introduce experimental llhttp HTTP parser - #24059
Conversation
indutny
commented
Nov 3, 2018
cc @nodejs/http |
indutny
commented
Nov 3, 2018
cc @nodejs/collaborators |
mcollina
commented
Nov 3, 2018
It’s not clear which part are written in TypeScript. I did some experiments recently, and I found out that a major bottleneck in our http implementation are C++/JS transitions. May I ask why this was not sent as a major contribution to http_parser? Would you be ok in transfering this to the foundation? |
indutny
commented
Nov 3, 2018
via email
I’m sorry, I must have included the link to the “source” of the project:
https://github.com/indutny/llhttp .
Although the API is similar, the projects are very different internally.
I’d be happy to transfer it to foundation, though.
As for the reason for the change - it is maintenance rather than
performance (the performance is about 2x times better, though!)
Additionally, in the future we could potentially make it generate fully
compatible JS output instead of C to remove the call overhead. …On Sat, Nov 3, 2018 at 11:36 Matteo Collina ***@***.***> wrote:
It’s not clear which part are written in TypeScript. I did some
experiments recently, and I found out that a major bottleneck in our http
implementation are C++/JS transitions.
May I ask why this was not sent as a major contribution to http_parser?
Would you be ok in transfering this to the foundation?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#24059 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAOjw9Pq00eEwn-LiiMEF7wFR-58xeSSks5urbfngaJpZM4YM2cb>
.
|
joyeecheung
commented
Nov 3, 2018
devsnek
left a comment
There was a problem hiding this comment.
I'm so glad this is finally happening 🎉
mscdex
commented
Nov 3, 2018
refack
commented
Nov 3, 2018
@indutny I was wondering when will/if you'll PR this ;) |
Uh oh!
There was an error while loading. Please reload this page.
refack
commented
Nov 3, 2018
|
refack
commented
Nov 3, 2018
Windows compilation errors: |
targos
commented
Nov 3, 2018
There seems to be some Windows incompatibilities. |
indutny
commented
Nov 3, 2018
@targos hopefully fixed now. |
indutny
commented
Nov 3, 2018
This is no longer relevant. llparse generates very fast C code, and bitcode is no longer required for the builds. |
jasnell
commented
Nov 3, 2018
I like the direction here and I'm definitely +1... but, I'd prefer to be a bit conservative on the approach with this... rather than removing and replacing the existing |
indutny
commented
Nov 3, 2018
@jasnell that would require a lot of |
jasnell
commented
Nov 3, 2018
While I'd generally prefer not to have to go that route, yes, I think it would be best... if only because of (a) how critical this particular bit of the code is for Node.js and (b) how performance and security sensitive this particular bit of code has always been. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
indutny
commented
Nov 3, 2018
Alright, pushed the @jasnell PTAL |
http_parser with llhttpllhttp HTTP parserindutny
commented
Nov 4, 2018
New CI: https://ci.nodejs.org/job/node-test-pull-request/18322/ (testing only http_parser mode) |
Uh oh!
There was an error while loading. Please reload this page.
refack
commented
Nov 4, 2018
IIUC |
Notable changes: * deps: * A new experimental HTTP parser (`llhttp`) is now supported. #24059 * timers: * Fixed an issue that could cause setTimeout to stop working as expected. #24322 * Windows * A crashing process will now show the names of stack frames if the node.pdb file is available. #23822 * Continued effort to improve the installer's new stage that installs native build tools. #23987, #24348 * child_process: * On Windows the `windowsHide` option default was restored to `false`. This means `detached` child processes and GUI apps will once again start in a new window. #24034 * Added new collaborators: * [oyyd](https://github.com/oyyd) - Ouyang Yadong. #24300 * [psmarshall](https://github.com/psmarshall) - Peter Marshall. #24170 * [shisama](https://github.com/shisama) - Masashi Hirano. #24136
Notable changes: * deps: * A new experimental HTTP parser (`llhttp`) is now supported. #24059 * timers: * Fixed an issue that could cause setTimeout to stop working as expected. #24322 * Windows * A crashing process will now show the names of stack frames if the node.pdb file is available. #23822 * Continued effort to improve the installer's new stage that installs native build tools. #23987, #24348 * child_process: * On Windows the `windowsHide` option default was restored to `false`. This means `detached` child processes and GUI apps will once again start in a new window. #24034 * Added new collaborators: * [oyyd](https://github.com/oyyd) - Ouyang Yadong. #24300 * [psmarshall](https://github.com/psmarshall) - Peter Marshall. #24170 * [shisama](https://github.com/shisama) - Masashi Hirano. #24136 PR-URL: #24350
kibertoad
commented
Nov 17, 2018
@indutny How does one opt-in into using it? Or it has to be consumed on a library level, e. g. from Express.js side? |
targos
commented
Nov 17, 2018
@kibertoad it is currently a build-time flag, so you have to compile Node by passing the |
love it!! Can I use it by default in the upcoming Node.js 12? |
joyeecheung
commented
Dec 5, 2018
PR in progress to make this a runtime flag: #24739 |
Should this be dont-land-on-v10.x and dont-land-on-v11.x, BTW? |
mcollina
commented
Dec 5, 2018
+1 |
indutny
commented
Dec 5, 2018
@joyeecheung +1 |
targos
commented
Dec 5, 2018
Too late for 11.x. This is already in v11. 2.0 |
joyeecheung
commented
Dec 5, 2018
@targos oops, I meant 8.x, somehow my fingers were not controlled by my brain.. |
why do node decide to adopt this then? |
indutny
commented
Dec 7, 2018
@tuananh this section answers it: https://github.com/indutny/llhttp#why |
tuananh
commented
Dec 7, 2018
@indutny by adopting llhttp, isn't it gonna be adding more maintenance responsibility as we need to maintain both llparse and llhttp? |
indutny
commented
Dec 7, 2018
Good point. Still both libraries are way more maintainable than http_parser in its current form. |
llhttp is modern, written in human-readable TypeScript, verifiable, and
is very easy to maintain.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes