Asynchronous `addSourceFilesAtPaths` and other methods
Right now the methods for adding sources files from the file system are synchronous and the ones for writing back to the file system are asynchronous by default (with sync api available via -Sync methods).
This was done because the compiler api reads from the file system synchronously. That said, methods like addSourceFilesAtPaths, addSourceFileAtPath, etc... could all be asynchronous. addSourceFilesAtPaths in particular could get a huge performance boost by parallelizing the work.
The existing api would be moved to -Sync methods. For example, addSourceFilesAtPaths would become addSourceFilesAtPathsSync and then be replaced with an asynchronous addSourceFilesAtPaths. The downside to this change is that if someone doesn't read the breaking changes doc and is not inspecting the return value, then they might not notice this has become asynchronous.
Relates to #702.
hi, would it be possible to introduce asynchronous input API also for ts-morph (like in ts-morph/bootstrap)? i have found out it on private repo with ~400 files, it's up to 900% slower (100ms vs 1000ms) to load the files into project in synchronous manner.