Improved reading and writing large Office files without copying them into memory (#1243)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-28 23:03:30 +01:00
1 parent 918572c158
commit dbe609a9a7
37 files changed
+1161 -471

No files matched your search

@@ -33,7 +33,7 @@ public abstract class TextSegmentFormat : IDocumentSegmentFormat
public long TextSizeOf(string path) => new FileInfo(path).Length;
/// <inheritdoc />
public async Task<IReadOnlyList<DocumentSegment>> ReadAsync(string path, CancellationToken token)
public async Task<IReadOnlyList<DocumentSegment>> ReadAsync(string path, ILogger logger, CancellationToken token)
{
var file = await this.ReadFileAsync(path, token);
return this.ReadSegments(file.Text).OrderBy(segment => segment.Start).Select(segment => segment.Segment).ToList();