Skip to content

Bypass caching in removeStringLiteralsMatchedByTemplateLiterals #46525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 26, 2021

Conversation

ahejlsberg
Copy link
Member

Fixes #46480.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 25, 2021
@ahejlsberg
Copy link
Member Author

@typescript-bot test this
@typescript-bot user test this inline
@typescript-bot run dt
@typescript-bot perf test faster

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 25, 2021

Heya @ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR at 6d84b02. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 25, 2021

Heya @ahejlsberg, I've started to run the inline community code test suite on this PR at 6d84b02. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 25, 2021

Heya @ahejlsberg, I've started to run the extended test suite on this PR at 6d84b02. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 25, 2021

Heya @ahejlsberg, I've started to run the abridged perf test suite on this PR at 6d84b02. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@ahejlsberg
Great news! no new errors were found between main..refs/pull/46525/merge

@typescript-bot
Copy link
Collaborator

@ahejlsberg
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..46525

Metric main 46525 Delta Best Worst
Angular - node (v14.15.1, x64)
Memory used 330,354k (± 0.01%) 330,254k (± 0.06%) -100k (- 0.03%) 329,502k 330,376k
Parse Time 1.95s (± 0.64%) 1.95s (± 0.87%) +0.00s (+ 0.21%) 1.93s 2.01s
Bind Time 0.86s (± 0.69%) 0.86s (± 0.43%) -0.00s (- 0.12%) 0.85s 0.86s
Check Time 5.33s (± 0.43%) 5.33s (± 0.41%) +0.00s (+ 0.09%) 5.30s 5.39s
Emit Time 6.13s (± 0.50%) 6.14s (± 0.60%) +0.01s (+ 0.15%) 6.07s 6.25s
Total Time 14.26s (± 0.26%) 14.27s (± 0.25%) +0.01s (+ 0.09%) 14.19s 14.34s
Compiler-Unions - node (v14.15.1, x64)
Memory used 192,567k (± 0.49%) 192,909k (± 0.36%) +342k (+ 0.18%) 190,078k 193,285k
Parse Time 0.81s (± 0.69%) 0.81s (± 0.64%) +0.00s (+ 0.37%) 0.80s 0.82s
Bind Time 0.55s (± 0.40%) 0.55s (± 0.40%) 0.00s ( 0.00%) 0.55s 0.56s
Check Time 7.53s (± 0.44%) 7.52s (± 0.41%) -0.01s (- 0.16%) 7.44s 7.58s
Emit Time 2.44s (± 0.71%) 2.44s (± 0.93%) +0.00s (+ 0.08%) 2.41s 2.52s
Total Time 11.34s (± 0.42%) 11.33s (± 0.34%) -0.01s (- 0.06%) 11.25s 11.42s
Monaco - node (v14.15.1, x64)
Memory used 324,010k (± 0.01%) 323,999k (± 0.00%) -10k (- 0.00%) 323,968k 324,022k
Parse Time 1.51s (± 0.62%) 1.51s (± 0.70%) -0.00s (- 0.07%) 1.49s 1.54s
Bind Time 0.75s (± 0.48%) 0.75s (± 0.59%) -0.00s (- 0.27%) 0.74s 0.76s
Check Time 5.30s (± 0.42%) 5.28s (± 0.31%) -0.02s (- 0.34%) 5.24s 5.31s
Emit Time 3.20s (± 0.53%) 3.21s (± 0.89%) +0.01s (+ 0.34%) 3.16s 3.27s
Total Time 10.76s (± 0.31%) 10.75s (± 0.28%) -0.01s (- 0.11%) 10.66s 10.81s
TFS - node (v14.15.1, x64)
Memory used 288,365k (± 0.01%) 288,364k (± 0.01%) -1k (- 0.00%) 288,324k 288,392k
Parse Time 1.23s (± 0.70%) 1.22s (± 0.30%) -0.01s (- 0.65%) 1.22s 1.23s
Bind Time 0.73s (± 0.76%) 0.73s (± 0.61%) -0.00s (- 0.55%) 0.72s 0.74s
Check Time 4.90s (± 0.53%) 4.89s (± 0.42%) -0.01s (- 0.18%) 4.84s 4.92s
Emit Time 3.48s (± 0.69%) 3.48s (± 0.62%) +0.01s (+ 0.17%) 3.44s 3.53s
Total Time 10.34s (± 0.35%) 10.32s (± 0.32%) -0.02s (- 0.15%) 10.24s 10.40s
material-ui - node (v14.15.1, x64)
Memory used 447,290k (± 0.08%) 447,510k (± 0.00%) +220k (+ 0.05%) 447,434k 447,537k
Parse Time 1.82s (± 0.49%) 1.83s (± 0.55%) +0.00s (+ 0.11%) 1.80s 1.84s
Bind Time 0.68s (± 0.54%) 0.68s (± 0.54%) 0.00s ( 0.00%) 0.67s 0.68s
Check Time 13.09s (± 0.97%) 12.97s (± 0.48%) -0.12s (- 0.94%) 12.81s 13.09s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.59s (± 0.84%) 15.48s (± 0.41%) -0.12s (- 0.76%) 15.32s 15.59s
xstate - node (v14.15.1, x64)
Memory used 533,836k (± 0.01%) 533,828k (± 0.00%) -9k (- 0.00%) 533,775k 533,874k
Parse Time 2.55s (± 0.54%) 2.55s (± 0.29%) -0.00s (- 0.04%) 2.54s 2.57s
Bind Time 1.15s (± 0.82%) 1.15s (± 0.92%) -0.00s (- 0.26%) 1.12s 1.17s
Check Time 1.55s (± 0.54%) 1.54s (± 0.38%) -0.00s (- 0.13%) 1.53s 1.55s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.32s (± 0.36%) 5.32s (± 0.34%) -0.00s (- 0.06%) 5.28s 5.35s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory10 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v14.15.1, x64)
Benchmark Name Iterations
Current 46525 10
Baseline main 10

Developer Information:

Download Benchmark

@ahejlsberg
Copy link
Member Author

Tests and performance look good.

@ahejlsberg ahejlsberg merged commit 658764e into main Oct 26, 2021
@ahejlsberg ahejlsberg deleted the fix46480 branch October 26, 2021 16:34
mprobst pushed a commit to mprobst/TypeScript that referenced this pull request Jan 10, 2022
…osoft#46525)

* Bypass caching in removeStringLiteralsMatchedByTemplateLiterals

* Add regression test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when generating a type (via template literals) that is too large
3 participants