Skip to content
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

Defer union or intersection property type normalization #31486

Merged
merged 3 commits into from May 28, 2019

Conversation

weswigham
Copy link
Member

Fixes #31441

@weswigham
Copy link
Member Author

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 21, 2019

Heya @weswigham, I've started to run the tarball bundle task on this PR at 1ac8380. You can monitor the build here. It should now contribute to this PR's status checks.

@weswigham
Copy link
Member Author

@typescript-bot test this
@typescript-bot run dt
@typescript-bot user test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 24, 2019

Heya @weswigham, I've started to run the community code test suite on this PR at 1ac8380. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 24, 2019

Heya @weswigham, I've started to run the extended test suite on this PR at 1ac8380. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 24, 2019

Heya @weswigham, I've started to run the parallelized Definitely Typed test suite on this PR at 1ac8380. You can monitor the build here. It should now contribute to this PR's status checks.

@RyanCavanaugh RyanCavanaugh added this to the TypeScript 3.5.0 milestone May 24, 2019
@RyanCavanaugh
Copy link
Member

This code passes in 3.3 and 3.4, but errors in 3.5 without the PR

interface Obj<T> {
	ref: T;
}
interface Func<T> {
	(x: T): void;
}
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
type CtorOf<T> = (arg: UnionToIntersection<T>) => T;

interface Big {
    "0": { common?: string; "0"?: number, ref?: Obj<Big["0"]> | Func<Big["0"]>; }
    "1": { common?: string; "1"?: number, ref?: Obj<Big["1"]> | Func<Big["1"]>; }
    "2": { common?: string; "2"?: number, ref?: Obj<Big["2"]> | Func<Big["2"]>; }
    "3": { common?: string; "3"?: number, ref?: Obj<Big["3"]> | Func<Big["3"]>; }
    "4": { common?: string; "4"?: number, ref?: Obj<Big["4"]> | Func<Big["4"]>; }
    "5": { common?: string; "5"?: number, ref?: Obj<Big["5"]> | Func<Big["5"]>; }
    "6": { common?: string; "6"?: number, ref?: Obj<Big["6"]> | Func<Big["6"]>; }
    "7": { common?: string; "7"?: number, ref?: Obj<Big["7"]> | Func<Big["7"]>; }
    "8": { common?: string; "8"?: number, ref?: Obj<Big["8"]> | Func<Big["8"]>; }
    "9": { common?: string; "9"?: number, ref?: Obj<Big["9"]> | Func<Big["9"]>; }
    "10": { common?: string; "10"?: number, ref?: Obj<Big["10"]> | Func<Big["10"]>; }
    "11": { common?: string; "11"?: number, ref?: Obj<Big["11"]> | Func<Big["11"]>; }
    "12": { common?: string; "12"?: number, ref?: Obj<Big["12"]> | Func<Big["12"]>; }
    "13": { common?: string; "13"?: number, ref?: Obj<Big["13"]> | Func<Big["13"]>; }
    "14": { common?: string; "14"?: number, ref?: Obj<Big["14"]> | Func<Big["14"]>; }
    "15": { common?: string; "15"?: number, ref?: Obj<Big["15"]> | Func<Big["15"]>; }
    "16": { common?: string; "16"?: number, ref?: Obj<Big["16"]> | Func<Big["16"]>; }
    "17": { common?: string; "17"?: number, ref?: Obj<Big["17"]> | Func<Big["17"]>; }
}
declare function getCtor<T extends keyof Big>(comp: T): CtorOf<Big[T]>

declare var all: keyof Big;
const ctor = getCtor(all);
const comp = ctor({ common: "ok" });

@weswigham
Copy link
Member Author

RWC failures are just from this branch being out of date from earlier this week, there's no actual RWC failures ❤️ (will merge and run again just in case tho)

@weswigham
Copy link
Member Author

@typescript-bot test this
@typescript-bot run dt
@typescript-bot user test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 24, 2019

Heya @weswigham, I've started to run the community code test suite on this PR at e1ba024. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 24, 2019

Heya @weswigham, I've started to run the parallelized Definitely Typed test suite on this PR at e1ba024. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 24, 2019

Heya @weswigham, I've started to run the extended test suite on this PR at e1ba024. You can monitor the build here. It should now contribute to this PR's status checks.

@weswigham
Copy link
Member Author

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 24, 2019

Heya @weswigham, I've started to run the perf test suite on this PR at e1ba024. You can monitor the build here. It should now contribute to this PR's status checks.

@weswigham
Copy link
Member Author

hoookay, canceled all the inflight ones - everything's up to date, there's no lint errors, and the baseline diff with master is accepted. Once more my bot, orchestrate:

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 24, 2019

Heya @weswigham, I've started to run the extended test suite on this PR at b37a3f8. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 24, 2019

Heya @weswigham, I've started to run the perf test suite on this PR at b37a3f8. You can monitor the build here. It should now contribute to this PR's status checks.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 24, 2019

Heya @weswigham, I've started to run the community code test suite on this PR at b37a3f8. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 24, 2019

Heya @weswigham, I've started to run the parallelized Definitely Typed test suite on this PR at b37a3f8. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..31486

Metric master 31486 Delta Best Worst
Angular - node (v12.1.0, x64)
Memory used 315,005k (± 0.02%) 315,006k (± 0.02%) +1k (+ 0.00%) 314,876k 315,254k
Parse Time 1.39s (± 0.72%) 1.38s (± 0.77%) -0.00s (- 0.22%) 1.37s 1.41s
Bind Time 0.73s (± 0.68%) 0.73s (± 0.71%) +0.00s (+ 0.41%) 0.72s 0.74s
Check Time 4.06s (± 0.39%) 4.07s (± 0.59%) +0.01s (+ 0.20%) 4.03s 4.13s
Emit Time 5.16s (± 0.57%) 5.14s (± 0.81%) -0.02s (- 0.33%) 5.04s 5.22s
Total Time 11.34s (± 0.27%) 11.33s (± 0.57%) -0.01s (- 0.08%) 11.21s 11.44s
Monaco - node (v12.1.0, x64)
Memory used 343,781k (± 0.01%) 343,805k (± 0.01%) +24k (+ 0.01%) 343,691k 343,937k
Parse Time 1.18s (± 0.75%) 1.18s (± 0.59%) -0.00s (- 0.34%) 1.16s 1.19s
Bind Time 0.67s (± 0.78%) 0.68s (± 1.48%) +0.01s (+ 1.20%) 0.66s 0.71s
Check Time 4.15s (± 0.61%) 4.16s (± 0.48%) +0.01s (+ 0.27%) 4.10s 4.20s
Emit Time 2.77s (± 0.73%) 2.78s (± 0.64%) +0.01s (+ 0.36%) 2.75s 2.83s
Total Time 8.77s (± 0.45%) 8.80s (± 0.24%) +0.03s (+ 0.33%) 8.74s 8.83s
TFS - node (v12.1.0, x64)
Memory used 300,840k (± 0.02%) 300,858k (± 0.03%) +19k (+ 0.01%) 300,708k 301,050k
Parse Time 0.90s (± 0.38%) 0.91s (± 0.52%) +0.00s (+ 0.44%) 0.90s 0.92s
Bind Time 0.62s (± 0.94%) 0.62s (± 0.99%) +0.00s (+ 0.65%) 0.61s 0.64s
Check Time 3.72s (± 0.50%) 3.75s (± 0.44%) +0.03s (+ 0.86%) 3.73s 3.80s
Emit Time 2.84s (± 0.36%) 2.85s (± 0.77%) +0.02s (+ 0.63%) 2.78s 2.89s
Total Time 8.08s (± 0.26%) 8.13s (± 0.35%) +0.05s (+ 0.66%) 8.07s 8.21s
Angular - node (v8.9.0, x64)
Memory used 332,917k (± 0.02%) 333,011k (± 0.01%) +94k (+ 0.03%) 332,950k 333,091k
Parse Time 1.77s (± 0.42%) 1.77s (± 0.50%) +0.00s (+ 0.23%) 1.75s 1.79s
Bind Time 0.79s (± 0.78%) 0.79s (± 1.07%) +0.00s (+ 0.25%) 0.78s 0.81s
Check Time 4.79s (± 1.57%) 4.79s (± 1.10%) -0.00s (- 0.08%) 4.66s 4.89s
Emit Time 5.78s (± 2.54%) 5.78s (± 2.76%) -0.00s (- 0.05%) 5.52s 6.17s
Total Time 13.13s (± 0.81%) 13.13s (± 0.92%) -0.00s (- 0.01%) 12.89s 13.42s
Monaco - node (v8.9.0, x64)
Memory used 360,921k (± 0.03%) 360,874k (± 0.02%) -47k (- 0.01%) 360,723k 360,996k
Parse Time 1.43s (± 0.36%) 1.43s (± 0.66%) +0.00s (+ 0.14%) 1.41s 1.46s
Bind Time 0.90s (± 2.52%) 0.89s (± 2.03%) -0.02s (- 2.10%) 0.86s 0.93s
Check Time 4.95s (± 1.85%) 5.08s (± 1.47%) +0.13s (+ 2.65%) 4.88s 5.23s
Emit Time 3.14s (± 6.53%) 2.94s (± 5.71%) -0.20s (- 6.30%) 2.80s 3.40s
Total Time 10.43s (± 1.39%) 10.34s (± 1.23%) -0.09s (- 0.82%) 10.16s 10.69s
TFS - node (v8.9.0, x64)
Memory used 316,302k (± 0.01%) 316,333k (± 0.01%) +31k (+ 0.01%) 316,242k 316,399k
Parse Time 1.13s (± 0.52%) 1.13s (± 0.46%) -0.00s (- 0.26%) 1.12s 1.14s
Bind Time 0.66s (± 0.74%) 0.66s (± 0.67%) -0.00s (- 0.30%) 0.65s 0.67s
Check Time 4.33s (± 0.63%) 4.35s (± 0.56%) +0.02s (+ 0.55%) 4.29s 4.41s
Emit Time 3.13s (± 0.38%) 3.12s (± 0.54%) -0.01s (- 0.19%) 3.08s 3.16s
Total Time 9.25s (± 0.37%) 9.26s (± 0.35%) +0.02s (+ 0.16%) 9.20s 9.32s
Angular - node (v8.9.0, x86)
Memory used 188,583k (± 0.03%) 188,620k (± 0.03%) +37k (+ 0.02%) 188,529k 188,761k
Parse Time 1.73s (± 0.65%) 1.72s (± 0.55%) -0.01s (- 0.29%) 1.71s 1.75s
Bind Time 0.93s (± 0.96%) 0.93s (± 0.75%) +0.00s (+ 0.54%) 0.92s 0.95s
Check Time 4.40s (± 0.60%) 4.43s (± 0.53%) +0.03s (+ 0.64%) 4.38s 4.47s
Emit Time 5.69s (± 0.52%) 5.66s (± 1.51%) -0.03s (- 0.51%) 5.52s 5.93s
Total Time 12.74s (± 0.23%) 12.74s (± 0.70%) -0.00s (- 0.02%) 12.55s 12.99s
Monaco - node (v8.9.0, x86)
Memory used 201,362k (± 0.03%) 201,319k (± 0.04%) -44k (- 0.02%) 201,175k 201,562k
Parse Time 1.49s (± 0.32%) 1.50s (± 0.59%) +0.01s (+ 0.47%) 1.48s 1.52s
Bind Time 0.71s (± 0.73%) 0.71s (± 0.94%) -0.00s (- 0.14%) 0.70s 0.73s
Check Time 4.74s (± 0.58%) 4.77s (± 0.63%) +0.03s (+ 0.53%) 4.70s 4.84s
Emit Time 3.09s (± 0.38%) 3.10s (± 0.83%) +0.01s (+ 0.42%) 3.06s 3.16s
Total Time 10.03s (± 0.25%) 10.08s (± 0.53%) +0.04s (+ 0.43%) 9.99s 10.24s
TFS - node (v8.9.0, x86)
Memory used 177,429k (± 0.03%) 177,452k (± 0.02%) +23k (+ 0.01%) 177,374k 177,518k
Parse Time 1.19s (± 0.93%) 1.20s (± 0.96%) +0.00s (+ 0.34%) 1.18s 1.22s
Bind Time 0.63s (± 0.75%) 0.64s (± 1.41%) +0.01s (+ 0.79%) 0.62s 0.65s
Check Time 4.15s (± 0.44%) 4.16s (± 0.71%) +0.02s (+ 0.39%) 4.12s 4.25s
Emit Time 2.77s (± 0.92%) 2.75s (± 0.70%) -0.02s (- 0.58%) 2.70s 2.79s
Total Time 8.74s (± 0.38%) 8.75s (± 0.57%) +0.01s (+ 0.14%) 8.64s 8.86s
Angular - node (v9.0.0, x64)
Memory used 332,720k (± 0.03%) 332,850k (± 0.01%) +130k (+ 0.04%) 332,732k 332,956k
Parse Time 1.62s (± 0.54%) 1.61s (± 0.37%) -0.01s (- 0.55%) 1.60s 1.63s
Bind Time 0.74s (± 0.45%) 0.75s (± 0.80%) +0.01s (+ 0.81%) 0.74s 0.76s
Check Time 4.40s (± 1.46%) 4.49s (± 1.71%) +0.09s (+ 1.98%) 4.39s 4.71s
Emit Time 5.58s (± 1.26%) 5.61s (± 1.92%) +0.03s (+ 0.50%) 5.35s 5.92s
Total Time 12.35s (± 0.33%) 12.46s (± 0.71%) +0.11s (+ 0.92%) 12.31s 12.77s
Monaco - node (v9.0.0, x64)
Memory used 360,574k (± 0.03%) 360,826k (± 0.01%) +252k (+ 0.07%) 360,711k 360,913k
Parse Time 1.28s (± 0.53%) 1.28s (± 0.47%) 0.00s ( 0.00%) 1.27s 1.29s
Bind Time 0.85s (± 0.39%) 0.85s (± 0.68%) 0.00s ( 0.00%) 0.84s 0.86s
Check Time 4.79s (± 0.54%) 4.81s (± 0.46%) +0.02s (+ 0.44%) 4.77s 4.88s
Emit Time 3.28s (± 0.49%) 3.30s (± 0.74%) +0.02s (+ 0.76%) 3.24s 3.37s
Total Time 10.21s (± 0.39%) 10.25s (± 0.35%) +0.04s (+ 0.40%) 10.13s 10.32s
TFS - node (v9.0.0, x64)
Memory used 316,113k (± 0.02%) 316,123k (± 0.02%) +10k (+ 0.00%) 316,010k 316,275k
Parse Time 1.00s (± 0.49%) 1.01s (± 0.59%) +0.01s (+ 1.10%) 1.00s 1.02s
Bind Time 0.61s (± 0.59%) 0.61s (± 0.59%) 0.00s ( 0.00%) 0.61s 0.62s
Check Time 4.30s (± 1.81%) 4.30s (± 1.42%) -0.01s (- 0.14%) 4.24s 4.52s
Emit Time 3.03s (± 2.64%) 3.09s (± 1.90%) +0.06s (+ 2.05%) 2.87s 3.16s
Total Time 8.95s (± 0.32%) 9.02s (± 0.37%) +0.07s (+ 0.75%) 8.96s 9.10s
Angular - node (v9.0.0, x86)
Memory used 188,688k (± 0.03%) 188,884k (± 0.02%) +195k (+ 0.10%) 188,831k 188,998k
Parse Time 1.54s (± 1.18%) 1.54s (± 0.86%) -0.00s (- 0.19%) 1.51s 1.57s
Bind Time 0.86s (± 0.88%) 0.88s (± 0.78%) +0.01s (+ 1.27%) 0.86s 0.89s
Check Time 4.11s (± 0.72%) 4.10s (± 0.52%) -0.01s (- 0.29%) 4.05s 4.14s
Emit Time 5.37s (± 1.05%) 5.33s (± 0.89%) -0.03s (- 0.60%) 5.23s 5.49s
Total Time 11.89s (± 0.73%) 11.85s (± 0.54%) -0.04s (- 0.31%) 11.74s 12.05s
Monaco - node (v9.0.0, x86)
Memory used 201,411k (± 0.02%) 201,405k (± 0.03%) -5k (- 0.00%) 201,289k 201,555k
Parse Time 1.31s (± 0.59%) 1.31s (± 0.58%) -0.00s (- 0.31%) 1.29s 1.32s
Bind Time 0.64s (± 1.27%) 0.64s (± 0.62%) -0.00s (- 0.31%) 0.63s 0.65s
Check Time 4.56s (± 0.51%) 4.61s (± 0.51%) +0.04s (+ 0.99%) 4.56s 4.66s
Emit Time 3.01s (± 0.46%) 3.01s (± 0.63%) +0.00s (+ 0.10%) 2.98s 3.07s
Total Time 9.53s (± 0.23%) 9.57s (± 0.39%) +0.04s (+ 0.44%) 9.48s 9.68s
TFS - node (v9.0.0, x86)
Memory used 177,497k (± 0.02%) 177,474k (± 0.02%) -23k (- 0.01%) 177,382k 177,545k
Parse Time 1.03s (± 0.60%) 1.03s (± 0.90%) +0.00s (+ 0.29%) 1.01s 1.05s
Bind Time 0.57s (± 1.27%) 0.57s (± 0.65%) +0.00s (+ 0.52%) 0.57s 0.58s
Check Time 4.01s (± 0.91%) 4.04s (± 0.73%) +0.03s (+ 0.65%) 3.96s 4.11s
Emit Time 2.71s (± 0.81%) 2.74s (± 1.88%) +0.03s (+ 1.03%) 2.62s 2.88s
Total Time 8.33s (± 0.60%) 8.39s (± 0.70%) +0.06s (+ 0.74%) 8.26s 8.53s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-142-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
  • node (v9.0.0, x64)
  • node (v9.0.0, x86)
Scenarios
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Angular - node (v9.0.0, x64)
  • Angular - node (v9.0.0, x86)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • Monaco - node (v9.0.0, x64)
  • Monaco - node (v9.0.0, x86)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
  • TFS - node (v9.0.0, x64)
  • TFS - node (v9.0.0, x86)
Benchmark Name Iterations
Current 31486 10
Baseline master 10

@weswigham weswigham merged commit e70f2af into microsoft:master May 28, 2019
weswigham added a commit that referenced this pull request May 28, 2019
* Defer union or intersection property type normalization (#31486)

* Defer union or intersection property type normalization

* Accept moved span

* Update user baselines (#31615)

* Cache widened types (#31586)

* Cache widened types

* Fix lint

* Accept LKG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CALL_AND_RETRY_LAST Allocation failed on 3.5.0-rc
4 participants