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

Performance regression in #34789 #36567

Closed
amcasey opened this issue Feb 1, 2020 · 3 comments
Closed

Performance regression in #34789 #36567

amcasey opened this issue Feb 1, 2020 · 3 comments
Assignees
Labels
Needs Investigation This issue needs a team member to investigate its status.

Comments

@amcasey
Copy link
Member

amcasey commented Feb 1, 2020

The extra work done in #34789 is valuable, but maybe it doesn't need to be so expensive.

Setup:

  1. Clone https://github.com/amcasey/material-ui.git
  2. Check out Benchmark
  3. yarn to restore packages
  4. yarn typescript to prebuild and run some TS tests

Repro

  1. tsc -p docs

On a random Mac Mini:

  • 10-run avg on 7d77ecb: 35,482ms
  • 10-run avg on 28050d5: 35,908ms (1% slower)

Note: to build old TS commits, you probably need to change const { default: chalk } to const chalk in scripts/build/utils.js.

@amcasey
Copy link
Member Author

amcasey commented Feb 1, 2020

FYI @sandersn

@ahejlsberg
Copy link
Member

I would expect some slowdown from this PR since we now do more work. Specifically, when relating two types we take into account whether one is contained in an intersection and separately compute the relationship for that situation. The material-ui test case heavily uses intersection types, so the observed 1% slowdown doesn't seem entirely unreasonable.

@amcasey
Copy link
Member Author

amcasey commented Feb 26, 2020

@ahejlsberg I agree that 1% in a pathological case isn't the end of the world and I'm fine won't-fixing this - I brought it up as one more straw on the camel's back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Investigation This issue needs a team member to investigate its status.
Projects
None yet
Development

No branches or pull requests

3 participants