react-docgen-typescript-loader icon indicating copy to clipboard operation
react-docgen-typescript-loader copied to clipboard

Reduce synchronous file IO

Open uselessinfo opened this issue 5 years ago • 0 comments
trafficstars

This change switches the initial loading of TypeScript into memory from synchronous to asynchronous, and avoids using fs.existsSync in the Service Host if we already have the file in memory.

For most setups this probably won't make much of a difference, but my project runs in Docker Desktop for Mac, which has a long standing issue with slow, CPU-intensive file IO in mounted folders, so it is necessary to keep build times reasonable. Moving to async for most of the filesystem operations keeps Webpack from pausing each time this loader is invoked.

uselessinfo avatar Aug 18 '20 16:08 uselessinfo