From 80c5fc570194171836f45452defdff8fc3f23ceb Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Thu, 24 May 2012 14:23:08 -0700 Subject: [PATCH] Bug 380020 - Adaptive batching of incoming data. --- .../internal/ui/buildconsole/BuildConsolePartitioner.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePartitioner.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePartitioner.java index 9a66f9369fa..c331ab3fd00 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePartitioner.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePartitioner.java @@ -408,10 +408,12 @@ public class BuildConsolePartitioner synchronized (fQueue) { StreamEntry entry = fQueue.peekLast(); if (entry != null) { - // If last stream is the same and we have not exceeded - // the display write limit, append. + // If last stream is the same and the size of the queued entry has not exceeded + // the batch size, avoid creating a new entry and append the new text to the last + // entry in the queue. The batch size is adaptive and grows with the length of + // the queue. if (entry.getStream() == stream && entry.getEventType() == StreamEntry.EVENT_APPEND && - entry.getMarker() == marker && entry.size() < 10000) { + entry.getMarker() == marker && entry.size() < 1000 * fQueue.size()) { entry.appendText(text); addToQueue = false; }