TiffLibrary icon indicating copy to clipboard operation
TiffLibrary copied to clipboard

Asynchronous file IO is not used

Open csboling opened this issue 11 months ago • 0 comments

Although the constructors for TiffFileStreamContentSource / TiffRandomAccessFileContentSource call GetOrCreateStream / GetOrCreateFileHandle with useAsync set to preferAsync (default true), the TiffFileReader.OpenAsync method then immediately calls contentSource.OpenReaderAsync, which in both these implementing classes hard-codes the useAsync parameter to false and thus replaces the FileStream / SafeFileHandle with an instance which is not configured for async IO. Underlying methods in System.IO.FileStream / System.IO.RandomAccess therefore do not use asynchronous kernel APIs.

csboling avatar Feb 05 '25 21:02 csboling