Hi all,

I would like to propose adding an mmap-based local file read backend to the C++ 
TsFile Reader.

Currently, the C++ Reader accesses local files through ReadFile, which uses 
pread on POSIX platforms. This read path is also shared by the C API and Python 
Reader.

The proposal is to retain the existing pread implementation while adding mmap 
as an optional backend. This may reduce system-call overhead for fine-grained 
random reads and provide a foundation for directly accessing mapped regions in 
future optimizations. On POSIX systems, the original file descriptor can also 
be closed after a successful mapping, which may reduce long-lived FD usage when 
reading many TsFiles concurrently.

I have created an Issue describing the proposed interface and mechanism:

https://github.com/apache/tsfile/issues/903

Comments and suggestions are welcome.

Best regards,
Colin Lee

Reply via email to