Commit a3762d0
authored
perf: avoid per-chunk byte[] copy in CryptifyClient.StoreChunkAsync (#30)
Use the ByteArrayContent(buffer, offset, count) overload to slice the
source array without copying, instead of allocating a fresh byte[] per
chunk and BlockCopy'ing into it.
For a 100 MB upload at the 1 MB chunk size this avoids 100 redundant
1 MB allocations on top of the original buffer.
Closes #27
Co-authored-by: dobby-yivi-agent[bot] <275734547+dobby-yivi-agent[bot]@users.noreply.github.com>1 parent 1480dce commit a3762d0
1 file changed
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | 92 | | |
96 | 93 | | |
97 | | - | |
| 94 | + | |
98 | 95 | | |
99 | 96 | | |
100 | 97 | | |
| |||
0 commit comments