-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor string encoding to be consistent and more memory efficient (#…
…223) * Remove intermediate array allocations from ASCII decoding * Update RespWriteUtils to take spans instead of arrays * Let's not encourage allocations * Merge WriteResponse with WriteDirect * They're the samething aka "TryCopyTo" if it was BCL naming * Remove intermediate array allocations from ASCII string encoding * Add WriteAsciiDirect to RespWriteUtils * Update ASCII encoding logic to increment the curr pointer with the "actual" encoded byte count, just to be sure. * Rename WriteBulkString to WriteAsciiBulkString * Makes it clear what was the assumption for the input string * Make all simple string encoding variants behave consistently * Either they should all assume the input to be ASCII, or none of them, or there should be explicit overloads for "unsafe" assumptions. * Remove intermediate array allocations from ASCII string encoding * Now using the WriterDirectAscii * Remove more intermediate array allocations from ASCII string encoding * Removed unnecessary explicit ROSpan<byte> casts from arrays * Remove more intermediate array allocations from ASCII string encoding * Skip encoding of constant strings by making them u8-literals * Remove more intermediate array allocations from ASCII string encoding * Remove couple allocations from WriteSimpleString calls * Remove more intermediate array allocations from ASCII string encoding * Skip encoding of constant strings by making them u8-literals * Fix merge * Add WriteUtf8BulkString overload to RespWriteUtils * Add simple regression test for unicode SET value * and watch as tests hang * Fix GarnetClient encoding of unicode bulk strings as keys or values * Add missing newline to generic error response in ReplicaOfCommand * Do not repeat the error message in PrimarySendCheckpoint
- Loading branch information
1 parent
fed14fe
commit f2ee39a
Showing
45 changed files
with
495 additions
and
472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.