From 41e80159b37d8a07922fb90d516b9105f2f185b7 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Tue, 19 Jan 2010 03:15:07 +0000 Subject: Digging into why the repl is so slow, discovere... Digging into why the repl is so slow, discovered that fsc is once again never reusing compiler instances (but for a different reason than #1683.) Small changes break equality and the little troopers are so darn quiet about it. Steady state, hot fsc repl startup times before this patch: 0m1.747s 0m1.789s 0m1.842s 0m1.690s After this patch: 0m1.139s 0m1.148s 0m1.090s 0m1.091s No review. Could use a test case but I have trouble coaxing partest this far outside the box. --- src/compiler/scala/tools/nsc/CompilerCommand.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compiler/scala/tools/nsc/CompilerCommand.scala') diff --git a/src/compiler/scala/tools/nsc/CompilerCommand.scala b/src/compiler/scala/tools/nsc/CompilerCommand.scala index 8465227133..75a3414d75 100644 --- a/src/compiler/scala/tools/nsc/CompilerCommand.scala +++ b/src/compiler/scala/tools/nsc/CompilerCommand.scala @@ -33,7 +33,7 @@ class CompilerCommand( val cmdName = "scalac" private val helpSyntaxColumnWidth: Int = - (settings.allSettings map (_.helpSyntax.length)) max + (settings.settingSet map (_.helpSyntax.length)) max private def format(s: String): String = { val buf = new StringBuilder(s) @@ -44,7 +44,7 @@ class CompilerCommand( /** Creates a help message for a subset of options based on cond */ def createUsageMsg(label: String, cond: (Setting) => Boolean): String = - settings.allSettings . + settings.settingSet . filter(cond) . map(s => format(s.helpSyntax) + " " + s.helpDescription) . mkString("Usage: %s \n%s options include:\n " . -- cgit v1.2.3