aba8b4e2ba
The reason is that searching for a class in a VirtualFile-based directory (i.e. in a package) happens for O(|amount-of-files-in-dir|), and it may be rather crucial for packages with a huge amount of classes Note that it was checked that the cache should not take a lot of heap since we call findClass only for really existing classes: see org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaPackageScope.kt:48 For example, there are no more than 10k classes for the whole intelliJ project (but the cache is flushed for each module)