TiffLibrary
TiffLibrary copied to clipboard
Asynchronous file IO is not used
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.