Repository navigation
Type check files in parallel in service_slim - #18
MangelMaxime wants to merge 15 commits into
Conversation
Fixed merge
Temporary fix, remove when upstream dotnet#13786 is fixed.
|
@MangelMaxime I assume you've already looked at |
|
Yes, I looked at it. It's the same graph used for a different question. They share the graph construction now: I kept them as two entries on purpose. Fable has to re-emit every transitive dependent because dependents embed the bodies of |
InteractiveChecker.ParseAndCheckProjecttype checks files concurrently over the file dependency graph, using the same graph machinery as fsc. Results are folded, cached and reported to the subscriber in project order, so callers see the same per-file states as the sequential check. Graph mode is the compiler default;--parallelcompilation-keeps the previous sequential path.Each file's result is kept with the versions of the files it was checked against and reused until one of them changes, including across checks cut short with
lastFile. Files declaring the same module in different directories are linkedexplicitly, since the dependency graph only records the first file that declares a module.
Measured with Fable on a 32-core machine, cold compile, output byte identical:
For easier maintenance when rebasing on upstream, the changes needed for graph-based checking are contained in
service_slim.fs.Note
I also tried creating the checker with
ReduceMemoryFlag.No, so the IL reader keeps its metadata decode caches as fsc does. It gives about 4% on Fable's type check, roughly 100 ms on the test suite.Peak RSS went up noticeably in that configuration, from about 1.0 GB to 1.5-1.8 GB on the Fable test suite and from 0.68 GB to 0.9-1.1 GB on Thoth.Json. I have not confirmed whether that is retained data or GC heap growth, so I left it out for now. It can be a follow-up with a proper heap measurement.