changeset 123:dc316f7e2efa

@GMB processor: use Writer instead of OutputStream. Results in massive improvements in benchmark compile times, because now we write with chunks, not with the individual bytes.
author shade
date Tue, 20 Aug 2013 22:40:43 +0400
parents 6cc908c9ba44
children d81474dacdf3
files jmh-core/src/main/java/org/openjdk/jmh/processor/internal/GenerateMicroBenchmarkProcessor.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/processor/internal/GenerateMicroBenchmarkProcessor.java	Mon Aug 19 13:20:59 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/processor/internal/GenerateMicroBenchmarkProcessor.java	Tue Aug 20 22:40:43 2013 +0400
@@ -265,7 +265,7 @@
         try {
             // Create file and open an outputstream
             JavaFileObject jof = processingEnv.getFiler().createSourceFile(info.generatedName, clazz);
-            PrintWriter writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(jof.openOutputStream()), 64*1024), false);
+            PrintWriter writer = new PrintWriter(jof.openWriter(), false);
 
             // Write package and imports
             writer.println("package " + info.generatedPackageName + ';');