-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Improve performance of maybe stack in recursiveTypeRelatedTo #55224
Conversation
@typescript-bot test this |
Heya @jakebailey, I've started to run the extended test suite on this PR at 0009999. You can monitor the build here. |
Heya @jakebailey, I've started to run the diff-based top-repos suite on this PR at 0009999. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the tarball bundle task on this PR at 0009999. You can monitor the build here. |
Heya @jakebailey, I've started to run the diff-based user code test suite on this PR at 0009999. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the diff-based user code test suite (tsserver) on this PR at 0009999. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR at 0009999. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the diff-based top-repos suite (tsserver) on this PR at 0009999. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the perf test suite on this PR at 0009999. You can monitor the build here. Update: The results are in! |
Hey @jakebailey, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running There is also a playground for this build and an npm module you can use via |
@jakebailey Here are the results of running the user test suite comparing There were infrastructure failures potentially unrelated to your change:
Otherwise... Something interesting changed - please have a look. Details
|
@jakebailey Here are the results of running the user test suite comparing Everything looks good! |
@jakebailey Here they are:
CompilerComparison Report - main..55224
System
Hosts
Scenarios
TSServerComparison Report - main..55224
System
Hosts
Scenarios
StartupComparison Report - main..55224
System
Hosts
Scenarios
Developer Information: |
Hm, slower... |
@jakebailey Here are the results of running the top-repos suite comparing Everything looks good! |
Hey @jakebailey, the results of running the DT tests are ready. |
@jakebailey Here are the results of running the top-repos suite comparing Everything looks good! |
@typescript-bot perf test this |
Heya @jakebailey, I've started to run the perf test suite on this PR at a703f48. You can monitor the build here. Update: The results are in! |
@jakebailey Here they are:
CompilerComparison Report - main..55224
System
Hosts
Scenarios
TSServerComparison Report - main..55224
System
Hosts
Scenarios
StartupComparison Report - main..55224
System
Hosts
Scenarios
Developer Information: |
@typescript-bot perf test this |
@typescript-bot perf test this faster |
Heya @jakebailey, I've started to run the abridged perf test suite on this PR at 42d68cb. You can monitor the build here. Update: The results are in! |
@jakebailey Here they are:Comparison Report - main..55224
System
Hosts
Scenarios
Developer Information: |
I'm certain @weswigham had a PR to this effect some time ago, but now I can't find it. |
@typescript-bot perf test this faster |
Heya @jakebailey, I've started to run the abridged perf test suite on this PR at b59f2b6. You can monitor the build here. Update: The results are in! |
@jakebailey Here they are:Comparison Report - main..55224
System
Hosts
Scenarios
Developer Information: |
@typescript-bot pack this |
Heya @jakebailey, I've started to run the tarball bundle task on this PR at 6156ade. You can monitor the build here. |
Hey @jakebailey, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running There is also a playground for this build and an npm module you can use via |
For #54939
I did a pprof profile of #54939 and found that a suspicious amount of time was being spent in
recursiveTypeRelatedTo
directly (self time).The profile didn't really point to anything except for the loops over
maybeKeys
. I noticed that they were all operations where we could be looping over and over again when a set + stack could make every operation constant time.So, I did that, and the test case from #54939 improved quite a bit:
On an even more inflated version of that test, I tripled the number of properties, and:
The current version of this PR doesn't appear to regress our regular test suites (some get better).