apex-dev-tools / apex-ls

Apex language server library
Other
2 stars 1 forks source link

Improve Schema type lookup performance #301

Closed kjonescertinia closed 21 hours ago

kjonescertinia commented 3 days ago

The module level lookup for Schema types is adding quite a lot of cost to the loading phase due to the need to construct a new TypeName with Schema as the outer for each TypeName we are resolving.

A better approach would be to cache Schema types in their own hash map without the Schema outer on the TypeName. The lookup could then consult this map with the provided TypeName rather than construct a new TypeName just for this.