clj-rethinkdb
clj-rethinkdb copied to clipboard
Improve performance of byte handling
trafficstars
There may be more efficient ways to handle the bytes coming and going from RethinkDB than creating and parsing as strings. A few possibilities
- Look at gloss
:char-sequenceon the codecs, and if it actually improves performance. We need to handle two types if we go this route, ajava.nio.CharBuffer, and a:gloss.data.string.core/char-sequence(both areCharSequences, but the gloss one doesn't give access to the underlying array). - Look at using Netty JSON decoding instead
- Look at using io.netty.handler.codec.protobuf
- Reusing any resources
- Parsing the custom RethinkDB types in the JSON parsing
To encourage this: I've been looking at performance problems with clj-rethinkdb recently and from my profiling it appears that gloss.io/decode_stream is a major performance problem.
Additionally, gloss seems to have been abandoned.