JetBrains/intellij-scala — pull request #112 by fkorotkov (2014-12-11 01:25:37+00:00)
Title: Fixed performance issue on re-openning a project with many modules

It appeared if you have several hundred modules in your project on re-openning it ModuleManagerComponent fires a bunch of module opened events. And ScalaProjectEvents calls ProjectExt#hasScala which is slow because it iterates throught all modules and ModuleExt#scalaSdk call is expensive.

This patch is fixing project openning issues by subscribing only after project was opened. And optimizes ModuleExt#scalaSdk by spoping iterating through libraries once we found one which is a Scala SDK.