Graph-based type-checking: overlap TcState construction with dependency graph construction
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
When GraphBasedChecking is enabled, there is fair bit of preprocessing done, which only needs parsing results and not TcState and other objects.
Currently all these items are calculated first, before type-checking is started.
This issue is a suggestion to, in case of graph-based checking, run TcState generation task alongside graph resolution.
Here is a sample snapshot from compiling FCS. The selected fragment is the operations done after parsing, which are not necessary to do graph calculations (they are only needed after the dependency graph is established):

An alternative approach would be to optimize this code. I can see a few low-hanging fruit, eg. file name checking:

Such optimizations would apply to both graph-based and sequential type-checking, but will not give as much benefit as parallelizing the work alongside graph calculation.
Contributor guide
Assessment
This issue has not been assessed yet.