Add a cache for PsiBasedClassResolver instances
The PsiBasedClassResolver constructor isn't very cheap to call because it runs computation of conflicting names each time Again, this is helpful for Spring-interop because PsiBasedClassResolver is used very frequently there #KT-23380 Fixed
This commit is contained in:
+1
-1
@@ -78,7 +78,7 @@ class KotlinAnnotatedElementsSearcher : QueryExecutor<PsiModifierListOwner, Anno
|
||||
consumer: (KtDeclaration) -> Boolean): Boolean {
|
||||
assert(annClass.isAnnotationType) { "Annotation type should be passed to annotated members search" }
|
||||
|
||||
val psiBasedClassResolver = PsiBasedClassResolver(annClass)
|
||||
val psiBasedClassResolver = PsiBasedClassResolver.getInstance(annClass)
|
||||
val annotationFQN = annClass.qualifiedName!!
|
||||
|
||||
val candidates = getKotlinAnnotationCandidates(annClass, useScope)
|
||||
|
||||
Reference in New Issue
Block a user