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

[TCGC] introduce cache for model properties #2112

Open
ArcturusZhang opened this issue Jan 22, 2025 · 0 comments
Open

[TCGC] introduce cache for model properties #2112

ArcturusZhang opened this issue Jan 22, 2025 · 0 comments
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Comments

@ArcturusZhang
Copy link
Member

Unlike other types, we have cache in TCGC, such as SdkModelType, etc.
This ensures us if we put the same instance of Model from compiler, we always get back the same instance of SdkModelType.

We should introduce cache for model properties as well, now every time we give the same ModelProperty into getSdkModelPropertyType, it gives back a new instance every time.

@ArcturusZhang ArcturusZhang added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library
Projects
None yet
Development

No branches or pull requests

1 participant