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

Optimize constructing type nodes from types #34776

Open
DanielRosenwasser opened this issue Oct 28, 2019 · 0 comments
Open

Optimize constructing type nodes from types #34776

DanielRosenwasser opened this issue Oct 28, 2019 · 0 comments
Labels
Bug A bug in TypeScript Domain: Performance Reports of unusually slow behavior Help Wanted You can do this
Milestone

Comments

@DanielRosenwasser
Copy link
Member

Originally posted by @weswigham in #34119 (comment)

Yep, looking at the traces I see pretty much all the time spent in trySymbolTable and getAliasForSymbolInContainer, which are workers user for calculating visible symbol chains. The whole process is uncached and quite naive right now (it's pretty much the same as it was since TS 1.8, but we rely on it more and more). It has been on my backlog as something that needs to be rewritten with a better more cacheable structure for perf.

There's also a fair chunk of time spent in GC and in path component-related operations that might also need some optimization - I'm guessing the large number of import types we manufacture require a large number of path calculations which end up making a lot of garbage - some caching may be in order here.

@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Domain: Performance Reports of unusually slow behavior Domain: Type Display Bugs relating to showing types in Quick Info/Tooltips, Signature Help, or Completion Info labels Oct 28, 2019
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 3.8.0 milestone Oct 28, 2019
@weswigham weswigham added the Domain: Declaration Emit The issue relates to the emission of d.ts files label Feb 6, 2020
@RyanCavanaugh RyanCavanaugh added the Rescheduled This issue was previously scheduled to an earlier milestone label Aug 31, 2020
@RyanCavanaugh RyanCavanaugh removed this from the TypeScript 4.6.0 milestone Feb 3, 2022
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 4.6.1 milestone Feb 3, 2022
@RyanCavanaugh RyanCavanaugh added Help Wanted You can do this and removed Rescheduled This issue was previously scheduled to an earlier milestone Domain: Declaration Emit The issue relates to the emission of d.ts files Domain: Type Display Bugs relating to showing types in Quick Info/Tooltips, Signature Help, or Completion Info labels Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Performance Reports of unusually slow behavior Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

4 participants