From 75255aebdc7587e73fe9b92cc7c354d820c668a4 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Sat, 21 Apr 2012 18:03:57 +0400 Subject: [PATCH] use BufferedOutputStream when building jar it speeds up building (from 3% to 1% in CompileCompilerDependenciesTest) --- .../jet/codegen/forTestCompile/ForTestCompileSomething.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestCompileSomething.java b/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestCompileSomething.java index 174ffe669dc..c6d09a81878 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestCompileSomething.java +++ b/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestCompileSomething.java @@ -23,6 +23,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.JetTestUtils; import org.jetbrains.jet.TimeUtils; +import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; @@ -57,7 +58,7 @@ abstract class ForTestCompileSomething { FileOutputStream stdlibJar = new FileOutputStream(jarFile); try { - JarOutputStream jarOutputStream = new JarOutputStream(stdlibJar); + JarOutputStream jarOutputStream = new JarOutputStream(new BufferedOutputStream(stdlibJar)); try { copyToJar(classesDir, jarOutputStream); }