Check cancelation in KotlinJavaPsiFacade.findPackage()

This may help with some UI freezes caused by KT-33394, although
it does not fix the underlying performance problem.
This commit is contained in:
Matthew Gharrity
2019-08-16 15:06:35 -07:00
committed by Alexander Podkhalyuzin
parent 0a1b3a8455
commit a1f4a4572a
@@ -228,6 +228,8 @@ public class KotlinJavaPsiFacade {
}
public PsiPackage findPackage(@NotNull String qualifiedName, GlobalSearchScope searchScope) {
ProgressIndicatorAndCompilationCanceledStatus.checkCanceled();
PackageCache cache = SoftReference.dereference(packageCache);
if (cache == null) {
packageCache = new SoftReference<>(cache = new PackageCache());