InCerryGit opened a new pull request, #340:
URL: https://github.com/apache/arrow-dotnet/pull/340

   ## Summary
   
   This improves `ArrowStreamReader` when reading from `MemoryStream` instances 
that expose their underlying buffer. The reader now uses the exposed buffer for 
IPC message/schema metadata reads while preserving the existing reader-owned 
body-buffer boundary.
   
   The change is intentionally scoped to MemoryStream-backed IPC stream reads:
   
   - public/exposed `MemoryStream` can use the fast path
   - non-public `MemoryStream` and partial-read streams continue through the 
fallback stream-read path
   - record batch body data is still copied into allocator-owned memory before 
array construction
   - `ArrowMemoryReader` exact-length continuation-token handling is corrected 
for complete in-memory buffers
   
   ## Benchmark
   
   BenchmarkDotNet ShortRun, `ArrowReaderBenchmark`:
   
   | Scenario | Before | After |
   |---|---:|---:|
   | `ArrowReaderWithMemoryStream_ManagedMemory`, 100000 rows / 1 column | 
21629.3 us | 7707.6 us |
   | `ArrowReaderWithMemoryStream_ManagedMemory`, 100000 rows / 5 columns | 
91112.3 us | 40137.5 us |
   
   ## Validation
   
   - `dotnet test test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj -c Release 
--filter "FullyQualifiedName~Apache.Arrow.Tests.ArrowStreamReaderTests"`
   - `dotnet test 
test/Apache.Arrow.Compression.Tests/Apache.Arrow.Compression.Tests.csproj -c 
Release --filter 
"FullyQualifiedName~Apache.Arrow.Compression.Tests.ArrowStreamReaderTests"`
   - `dotnet build Apache.Arrow.sln -c Release`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to