Commit Graph

21 Commits

Author SHA1 Message Date
Helge Heß a904c4bae6
Merge branch 'develop' 2018-04-13 18:17:59 +02:00
Helge Heß dae92a76ac
Perf: Use more BB(integerAsString:)
... faster.
2018-04-13 18:15:57 +02:00
Helge Heß 9fe1bce783
itoa 2018-04-13 18:11:11 +02:00
Helge Heß 9011f2097c
Reduce size of RESPValue from 49 to 25
By backing RESPError fields in a class.
This way it isn't taking up storage in
each and every RESPValue.

25 is still > 24 though :-)

(thanks to @weissi for the suggestion)
2018-04-13 16:50:21 +02:00
Helge Heß 7339dbdcd6
Merge branch 'develop' 2018-04-13 15:55:42 +02:00
Helge Heß 5b78b9db82
And a public init
... empty, just to make init public ...
2018-04-13 15:39:56 +02:00
Helge Heß 4631728dab
Open up more functions
... that we wanna override.
2018-04-13 15:35:31 +02:00
Helge Heß 4672c49331
Make RESPChannelHandler work as a base-class
... so that we subclass it.

Intention: workaround NIOAny wrapping overhead.
2018-04-13 15:32:04 +02:00
Helge Heß 8e12a8a910
Keep array context values around
... this may be a no-op optimization,
but well.

It is actually trigger to do the right thing here.
In this version we flush the `values` array, which
transfers ownership of the array buffer to the
RESPValue.
But that buffer is never going to be modified, so
it would be nice to keep it alive. But if we do
keep it alive, we also keep the RESPValues alive,
which may point to full ByteBuffer's, which is
not desirable.

Whatever you do in Swift, you loose ;-)
2018-04-13 15:04:02 +02:00
Helge Heß 9c42e91687
Use array for ParserState
Disadvantage is that we cannot reuse the
Contiguous value array for the top-level
item.
(we could try to cache the struct in an
 ivar w/ a few hops).

Another option would be to use a fixed
size array or even a buffer-bptr to avoid
the range checks.
2018-04-13 14:36:46 +02:00
Helge Heß 0f6b7baa77
Move RESPParser to own file/struct
Instead of being embedded in the RedisChannel,
move the parser out, into an own struct.

This way we may be able to avoid NIO channel
pipeline overhead (NIOAny wrapping).
2018-04-13 13:45:19 +02:00
Helge Heß ed657cd709
Merge branch 'develop' 2018-04-12 16:19:40 +02:00
Helge Heß 0fbc1becd2
Note on server 2018-04-12 16:19:23 +02:00
Helge Heß d623a10844
README: Break more indentation 2018-04-11 14:12:03 +02:00
Helge Heß 8e3e19b161
README: Break indent, fix text 2018-04-11 14:10:19 +02:00
Helge Hess d93af15daa
Point Travis badge to proper branch 2018-04-11 00:50:00 +02:00
Helge Hess 54e12c2285
Badges 2018-04-11 00:44:25 +02:00
Helge Hess cf75b7e6e5
README: Add some links 2018-04-11 00:36:11 +02:00
Helge Hess f20b75e159
Travis: Add Travis setup
Build for Linux 4.0.3/4.1.0 and Xcode 9.0/9.3.
2018-04-11 00:31:22 +02:00
Helge Hess 5fef65eb2f
Initial drop 2018-04-11 00:27:29 +02:00
Helge Heß e106fd7c21
Initial commit 2018-04-10 23:21:35 +02:00