Skip to content

Create map from fileNames in referenced projects to resolvedProjectReference for quick determination of fileName to projectReferenceRedirect#28610

Merged
sheetalkamat merged 1 commit into
masterfrom
resolvedReferencedDirectMap
Nov 20, 2018
Merged

Create map from fileNames in referenced projects to resolvedProjectReference for quick determination of fileName to projectReferenceRedirect#28610
sheetalkamat merged 1 commit into
masterfrom
resolvedReferencedDirectMap

Conversation

@sheetalkamat
Copy link
Copy Markdown
Member

@sheetalkamat sheetalkamat commented Nov 19, 2018

This speeds up program time creation especially when there are lot of files being added from module resolution.

The results by running similar changes against 3.1.6 from branch

SampleProject1:
                     Before         After
Files:                 7532          7532
Lines:               484560        484560   
Nodes:              1671393       1671393
Identifiers:         535514        535514
Symbols:             544664        544664
Types:               178410        178410
Memory used:        881625K       969328K
I/O Read time:        4.98s         4.70s
Parse time:           3.08s         3.34s
Program time:        70.27s        34.09s
Bind time:            1.43s         1.53s
Check time:          10.89s        13.03s
transformTime time:  11.94s        11.76s
commentTime time:     1.31s         1.28s
I/O Write time:      31.17s        30.68s
Source Map time:      2.25s         2.12s
printTime time:      55.89s        54.85s
Emit time:           55.89s        54.85s
Total time:         138.48s       103.50s


SampleProject2:
                     Before         After
Files:                 2279          2279
Lines:               217646        217646
Nodes:               666632        666632
Identifiers:         217008        217008
Symbols:             182741        182741
Types:                28149         28149
Memory used:        339431K       378820K
I/O Read time:        1.68s         1.14s
Parse time:           1.34s         1.85s
Program time:        41.65s        11.99s
Bind time:            0.47s         0.72s
Check time:           1.87s         1.79s
transformTime time:   1.00s         0.91s
commentTime time:     0.15s         0.11s
Source Map time:      0.22s         0.16s
I/O Write time:       3.25s         2.81s
printTime time:       5.79s         5.05s
Emit time:            5.79s         5.05s
Total time:          49.77s        19.55s


SampleProject3:
                     Before         After
Files:                 8825          8825
Lines:               523559        523559
Nodes:              1808872       1808872
Identifiers:         574875        574875
Symbols:             592580        592580
Types:               176342        176342
Memory used:        923577K       879920K
I/O Read time:       11.05s         4.70s
Parse time:           3.33s         3.02s
Program time:       389.16s        36.84s
Bind time:            1.09s         1.10s
Check time:           9.35s         9.76s
transformTime time:  10.66s         9.68s
commentTime time:     1.14s         1.14s
Source Map time:      2.19s         2.15s
I/O Write time:      23.01s        22.46s
printTime time:      43.10s        42.75s
Emit time:           43.10s        42.75s
Total time:         442.69s        90.45s

Comment thread src/compiler/program.ts Outdated
@sheetalkamat sheetalkamat force-pushed the resolvedReferencedDirectMap branch from 7a8f4f7 to aec79b1 Compare November 19, 2018 22:36
Copy link
Copy Markdown
Contributor

@rbuckton rbuckton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment

Comment thread src/compiler/program.ts Outdated
…ference for quick determination of fileName to projectReferenceRedirect
@sheetalkamat sheetalkamat force-pushed the resolvedReferencedDirectMap branch from aec79b1 to 979dac3 Compare November 19, 2018 22:55
@MLoughry
Copy link
Copy Markdown

Thanks for the fix. What's the likelihood this gets included in either 3.1.7 or 3.2.0 release?

@sheetalkamat sheetalkamat merged commit ddded2d into master Nov 20, 2018
@sheetalkamat sheetalkamat deleted the resolvedReferencedDirectMap branch November 20, 2018 00:58
@weswigham
Copy link
Copy Markdown
Member

3.2: most assuredly

3.1.7: We don't have plans (that I'm aware of) to push a 3.1.7, since 3.2.1 is targeted for next weekish.

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants