-
Notifications
You must be signed in to change notification settings - Fork 509
Implement drainingRead mechanism for JS-backed streams #5838
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
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging this PR will degrade performance by 45.07%Comparing Summary
Performance Changes
Footnotes
|
ccf8ddb to
532de1d
Compare
3e3b2fc to
a580f71
Compare
|
This also now includes a needed improvement to the handling of the |
| # Timeout objects with methods like refresh(), ref(), unref(), and hasRef(). | ||
| # This flag requires nodejs_compat or nodejs_compat_v2 to be enabled. | ||
|
|
||
| noAutoAllocateChunkSize @154 :Bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change depend on the drainingRead change? If not, I'd suggest putting this last commit in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not directly but I'd end up fighting merge conflicts if a split them that I'd rather avoid having to deal with. I can separate it to a separate PR but it would still chain off this one to avoid the conflicts.
0ac80c4 to
76328d2
Compare
The next
experimentstep in improving the performance of streams pump to, here specifically in the ReadableSourceKjAdapter pump to... we implementan experimentala "draining read" that will consume as much data as possible synchronously on each read. The results are promising.We will optimize the other cases (e.g. KJ-readable-to-JS-writable) in a separate PR. This one is specifically looking to improve the JS-readable-to-KJ-writable case.
Claude did most of the work here under supervision.
The one perf regression is in an artificial scenario.