Skip to content

Conversation

@pontusmelke
Copy link
Contributor

Keeps a buffer instead of reading individual bytes from channel.

Benchmarks show that this makes reading 5 times faster when reading 1 million rows from the database.

@jexp
Copy link
Member

jexp commented Mar 29, 2016

Yay! Thanks @pontusmelke

@jakewins
Copy link
Contributor

This looks awesome, the code is quite readable, much better than what it was before as well. So win-win in more efficient buffer usage and more maintainable code :)

I'm missing one thing - when we've changed things around this stuff before, it's almost always introduced tricky edge cases. We rooted a lot of those cases out on the server side by using this test: https://github.com/neo4j/neo4j/blob/3.1/community/bolt/src/test/java/org/neo4j/bolt/v1/transport/socket/FragmentedMessageDeliveryTest.java#L66

Maybe we could copy that test into the driver (and edit it as appropriate) as part of this commit, as way to show that there's no fragmented delivery case that we do not handle with this new state machine approach?

@pontusmelke pontusmelke force-pushed the 1.1-chunking-state-machine branch from 15fdcad to a6f99cd Compare March 30, 2016 10:29
@pontusmelke
Copy link
Contributor Author

@jakewins Ported the test

@pontusmelke pontusmelke mentioned this pull request Mar 30, 2016
@pontusmelke
Copy link
Contributor Author

Use #150 instead

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.

3 participants