/** * Read queue for limiting concurrent file read operations * Reduces I/O contention by batching reads separately from processing concurrency * Also supports file prefetching/pre-reading for better performance */ export declare class ReadQueue { private readonly maxConcurrentReads; private readQueue; private activeReads; private fileCache; private readonly prefetchSize; constructor(maxConcurrentReads?: number, prefetchSize?: number); /** * Prefetch files in batches for better performance * Currently disabled (prefetchSize = 0) as it was causing performance regression */ prefetchFiles(filePaths: string[]): Promise; /** * Queue a file read operation * Uses cache if file was prefetched */ readFile(filePath: string): Promise; /** * Process the read queue */ private processQueue; /** * Perform the actual file read * Uses streams for large files (>1MB) to reduce memory pressure */ private performRead; /** * Read large file using stream for better memory efficiency */ private readFileStream; /** * Wait for all queued reads to complete */ waitForCompletion(): Promise; } /** * Initialize the global read queue */ export declare function initReadQueue(maxConcurrentReads?: number, prefetchSize?: number): void; /** * Prefetch files for better read performance */ export declare function prefetchFiles(filePaths: string[]): Promise; /** * Get the global read queue */ export declare function getReadQueue(): ReadQueue | null; /** * Wait for all queued reads to complete */ export declare function waitForReadQueue(): Promise; //# sourceMappingURL=readQueue.d.ts.map