mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 380020 - Adaptive batching of incoming data.
This commit is contained in:
parent
772ac62107
commit
80c5fc5701
1 changed files with 5 additions and 3 deletions
|
@ -408,10 +408,12 @@ public class BuildConsolePartitioner
|
||||||
synchronized (fQueue) {
|
synchronized (fQueue) {
|
||||||
StreamEntry entry = fQueue.peekLast();
|
StreamEntry entry = fQueue.peekLast();
|
||||||
if (entry != null) {
|
if (entry != null) {
|
||||||
// If last stream is the same and we have not exceeded
|
// If last stream is the same and the size of the queued entry has not exceeded
|
||||||
// the display write limit, append.
|
// 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 &&
|
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);
|
entry.appendText(text);
|
||||||
addToQueue = false;
|
addToQueue = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue