[AA] KT-56617 Build FirClassSymbols for Java classes lazily
- Some completion performance tests (e.g. IntelliJ: "empty place typing with library cache") spent a considerable amount of time in `KtFirSymbolProviderByJavaPsi.getNamedClassSymbol`. - This commit introduces `KtFirPsiJavaClassSymbol`, which implements many `KtNamedClassOrObjectSymbol` properties with the `PsiClass` instead of the FIR class. The `FirClassSymbol` is built only when necessary. This improves performance when no "slow" properties need to be computed for the symbol. ^KT-56617 fixed
This commit is contained in:
committed by
Space Team
parent
e70a3a899f
commit
1c46d37663
@@ -34,7 +34,7 @@ internal val JavaModifierListOwner.modality: Modality
|
||||
else -> Modality.OPEN
|
||||
}
|
||||
|
||||
internal val JavaClass.modality: Modality
|
||||
val JavaClass.modality: Modality
|
||||
get() = when {
|
||||
isAnnotationType || isEnum -> Modality.FINAL
|
||||
isSealed -> Modality.SEALED
|
||||
@@ -43,7 +43,7 @@ internal val JavaClass.modality: Modality
|
||||
else -> Modality.OPEN
|
||||
}
|
||||
|
||||
internal val JavaClass.classKind: ClassKind
|
||||
val JavaClass.classKind: ClassKind
|
||||
get() = when {
|
||||
isAnnotationType -> ClassKind.ANNOTATION_CLASS
|
||||
isInterface -> ClassKind.INTERFACE
|
||||
|
||||
Reference in New Issue
Block a user