Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2009-02-03 14:33:23 +0000
committerDarin Wright2009-02-03 14:33:23 +0000
commit5e8d63d1bb006550d37c19f7b2a745f56ec735e6 (patch)
tree40e8c104739bc5ee264aff3b0522eaabbb6cef3f /org.eclipse.ui.console
parent109d07fad84b4b4307beaea08450cd4c1efb78d1 (diff)
downloadeclipse.platform.debug-5e8d63d1bb006550d37c19f7b2a745f56ec735e6.tar.gz
eclipse.platform.debug-5e8d63d1bb006550d37c19f7b2a745f56ec735e6.tar.xz
eclipse.platform.debug-5e8d63d1bb006550d37c19f7b2a745f56ec735e6.zip
Bug 221234 - [console] Programs with lots of output cause major eclipse unresponsiveness with large console buffer
Diffstat (limited to 'org.eclipse.ui.console')
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java48
1 files changed, 23 insertions, 25 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java
index cbc70c71c..82ea4fa6f 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java
@@ -533,31 +533,29 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
ArrayList pendingCopy = new ArrayList();
StringBuffer buffer = null;
boolean consoleClosed = false;
- while (pendingPartitions.size() > 0) {
- synchronized(pendingPartitions) {
- pendingCopy.addAll(pendingPartitions);
- pendingPartitions.clear();
- fBuffer = 0;
- pendingPartitions.notifyAll();
- }
- // determine buffer size
- int size = 0;
- for (Iterator i = pendingCopy.iterator(); i.hasNext(); ) {
- PendingPartition pp = (PendingPartition) i.next();
- if (pp != consoleClosedPartition) {
- size+= pp.text.length();
- }
- }
- buffer = new StringBuffer(size);
- for (Iterator i = pendingCopy.iterator(); i.hasNext(); ) {
- PendingPartition pp = (PendingPartition) i.next();
- if (pp != consoleClosedPartition) {
- buffer.append(pp.text);
- } else {
- consoleClosed = true;
- }
- }
- }
+ synchronized(pendingPartitions) {
+ pendingCopy.addAll(pendingPartitions);
+ pendingPartitions.clear();
+ fBuffer = 0;
+ pendingPartitions.notifyAll();
+ }
+ // determine buffer size
+ int size = 0;
+ for (Iterator i = pendingCopy.iterator(); i.hasNext(); ) {
+ PendingPartition pp = (PendingPartition) i.next();
+ if (pp != consoleClosedPartition) {
+ size+= pp.text.length();
+ }
+ }
+ buffer = new StringBuffer(size);
+ for (Iterator i = pendingCopy.iterator(); i.hasNext(); ) {
+ PendingPartition pp = (PendingPartition) i.next();
+ if (pp != consoleClosedPartition) {
+ buffer.append(pp.text);
+ } else {
+ consoleClosed = true;
+ }
+ }
if (connected) {
setUpdateInProgress(true);

Back to the top