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

Add diagnostics for relation cache size #30999

Merged
merged 4 commits into from
Apr 17, 2019
Merged

Conversation

sandersn
Copy link
Member

No description provided.

@@ -114,6 +114,9 @@ namespace ts {
getIdentifierCount: () => sum(host.getSourceFiles(), "identifierCount"),
getSymbolCount: () => sum(host.getSourceFiles(), "symbolCount") + symbolCount,
getTypeCount: () => typeCount,
getAssignabilityCacheSize: () => assignableRelation.size,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on doing it this way?

getRelationCacheSizes(): {
   assignable: assignableRelation.size,
   identity: identityRelation.size,
   subtype: subtypeRelation.size
}

Copy link
Member

@DanielRosenwasser DanielRosenwasser Apr 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No love for comparablility I see. :sad:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RyanCavanaugh seems like a fine idea. do you want to reduce the number of calls when getting perf diagnostics, or reduce the API surface? (or both)

@DanielRosenwasser lolololololol

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, both (seems like you'd rarely want only one of them and it's basically free to query)

@sandersn sandersn merged commit 4420d10 into master Apr 17, 2019
@sandersn sandersn deleted the add-cache-size-diagnostics branch April 17, 2019 21:32
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.

4 participants