Skip to content

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