Do not force loading all kt-files inside LazyPackageDescriptor constructor
Effectively it leads to all stubs being built for any once used package The idea is that they only were used for FILE_TO_PACKAGE_FRAGMENT that is mostly read in backend and rarely in the IDE, so we can replace its usages with searching through related package-fragments
This commit is contained in:
+4
@@ -109,6 +109,10 @@ class StubBasedPackageMemberDeclarationProvider(
|
||||
return PackageIndexUtil.findFilesWithExactPackage(fqName, searchScope, project)
|
||||
}
|
||||
|
||||
override fun containsFile(file: KtFile): Boolean {
|
||||
return searchScope.contains(file.virtualFile ?: return false)
|
||||
}
|
||||
|
||||
override fun getTypeAliasDeclarations(name: Name): Collection<KtTypeAlias> {
|
||||
return KotlinTopLevelTypeAliasFqNameIndex.getInstance().get(childName(name), project, searchScope)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user