Skip to content

Improve performance of packstream packer #622

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

Merged
merged 2 commits into from
Nov 17, 2021

Conversation

robsdedude
Copy link
Member

The chunking bit of the protocol implementation could be sped up by not
constantly checking if chunking is necessary but postponing the chunking until
it's needed (i.e., before wrapping up a bolt message or when collecting the
byte stream to send it over the wire). This change includes an extra copy of the
data in memory, but since data is usually written in small amounts per buffer
write and chunking occurs rarely compared to this, the cost of constant checking
outweighs the cost of the extra copy for most practical use-cases.

The chunking bit of the protocol implementation could be sped up by not
constantly checking if chunking is necessary but postponing the chunking until
it's needed (i.e., before wrapping up a bolt message or when collecting the
byte stream to send it over the wire). This change includes an extra copy of the
data in memory, but since data is usually written in small amounts per buffer
write and chunking occurs rarely compared to this, the cost of constant checking
outweighs the cost of the extra copy for most practical use-cases.
@robsdedude robsdedude merged commit 3fc1b2c into neo4j:4.4 Nov 17, 2021
@robsdedude robsdedude deleted the faster-packing branch November 17, 2021 14:04
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.

1 participant