Files
seaweedfs/weed/filer
25e0c6080a filer: resume chunk reads where the last one ended (#13393)
* filer: resume chunk reads where the last one ended

ChunkReadAt walked the chunk views from the front on every ReadAt, so
reading a file of n chunks front to back took time proportional to n
squared. S3 GETs (256 KiB reads) and WebDAV downloads (32 KiB reads)
both read whole files through it: a 32 KiB read near the end of a file
of 100,000 chunks took 164 µs instead of 8 µs.

Keep where the last read ended and start the next walk there when it is
at or before the new offset. The mount merges new chunks into a live
reader's views, so the interval list now counts its edits and a kept
position is only used while the count is unchanged.

* filer: benchmark ChunkReadAt reads

Whole-file sequential reads at 1 to 100,000 chunks, one-chunk files read
with a new reader, and random reads, all served by mockChunkCache so they
measure the reader itself.

* filer: trim the resume-point comments

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Denis Maier <denis@dAir.lab>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 11:22:53 -08:00
..
2026-04-10 17:31:14 -07:00