Skip to content
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

Batch network packets in prepared statements #3402

Merged
merged 2 commits into from
Mar 17, 2025

Conversation

brianc
Copy link
Owner

@brianc brianc commented Mar 15, 2025

Fixes #3340
Fixes #3325
Fixes #3098

Copy link

cloudflare-workers-and-pages bot commented Mar 15, 2025

Deploying node-postgres with  Cloudflare Pages  Cloudflare Pages

Latest commit: e67418f
Status: ✅  Deploy successful!
Preview URL: https://e6417e81.node-postgres.pages.dev
Branch Preview URL: https://bmc-network-packet-perf-fix.node-postgres.pages.dev

View logs

@brianc
Copy link
Owner Author

brianc commented Mar 15, 2025

This actually did result in a small speedup on my version of node and osx...though maybe 5-10% (there's so much variance its hard to tell what amount is code change related and what is just "less operating system interrupts got in the way during the run") but there did seem to be a small consistent speedup which is cool! The bigger issue is on some operating system / node combos (wasn't able to identify any myself) there is a much more significant speedup this should offer.

@brianc
Copy link
Owner Author

brianc commented Mar 15, 2025

Special thanks, as always, to @charmander for the tip about stream.cork()! :) I'll leave this up for a day waiting for feedback then push a new semver patch.

@brianc brianc merged commit c53a472 into master Mar 17, 2025
13 checks passed
@brianc brianc deleted the bmc/network-packet-perf-fix branch March 17, 2025 15:28
@brianc
Copy link
Owner Author

brianc commented Mar 17, 2025

published in [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Horrible query performance since 8.2.0+ nodejs v18.17.1 / v20.9.0 - pg ^8.11.0 - slow select query
1 participant