compiler: Added public static getPerformanceCachingEnabled()/setPerformanceCachingEnabled() to DefinitionBase to enable caching definitions (such as the chain of super classes) for improved performance.

Defaults to false to avoid breaking IDEs and other consumers that support multiple projects and editing definitions after creation. Single-project environments, such as the command line compilers, can opt in for better performance.

Making this static isn't ideal, but I didn't find a good way to inject it from the project or elsewhere. There are too many places where definitions get created.
2 files changed