File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/main/java/com/google/devtools/build/lib/query2/query/output Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,11 @@ public void processOutput(Iterable<Target> partialResult)
59
59
StreamSupport .stream (partialResult .spliterator (), /* parallel= */ true )
60
60
.map (this ::toProto )
61
61
.map (StreamedProtoOutputFormatter ::writeDelimited )
62
- .forEach (this ::writeToOutputStreamThreadSafe );
62
+ // I imagine forEachOrdered hurts performance somewhat in some cases. While we may
63
+ // not need to actually produce output in order, this code does not know whether
64
+ // ordering was requested. So we just always write it in order, and hope performance
65
+ // is OK.
66
+ .forEachOrdered (this ::writeToOutputStreamThreadSafe );
63
67
} catch (WrappedIOException e ) {
64
68
throw e .getCause ();
65
69
} catch (WrappedInterruptedException e ) {
You can’t perform that action at this time.
0 commit comments