1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Preliminary solution for Bug 223154.

We increase the size of PipedInputBuffer from 1K to 1M
but using LargePipedInputBuffer
This commit is contained in:
Marc Khouzam 2008-03-27 16:57:01 +00:00
parent 060864a934
commit 9fd5e0d9eb
3 changed files with 26 additions and 4 deletions

View file

@ -101,10 +101,11 @@ public abstract class AbstractCLIProcess extends Process
PipedOutputStream miOutLogPipe = null;
try {
// Using a LargePipedInputStream see https://bugs.eclipse.org/bugs/show_bug.cgi?id=223154
miOutConsolePipe = new PipedOutputStream();
miInConsolePipe = new PipedInputStream(miOutConsolePipe);
miInConsolePipe = new LargePipedInputStream(miOutConsolePipe);
miOutLogPipe = new PipedOutputStream();
miInLogPipe = new PipedInputStream(miOutLogPipe);
miInLogPipe = new LargePipedInputStream(miOutLogPipe);
} catch (IOException e) {
ILog log = MIPlugin.getDefault().getLog();
if (log != null) {

View file

@ -0,0 +1,19 @@
package org.eclipse.dd.mi.service.command;
import java.io.IOException;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
class LargePipedInputStream extends PipedInputStream {
private final int LARGE_BUF_SIZE = 1024 * 1024; // 1 megs
public LargePipedInputStream(PipedOutputStream pipedoutputstream)
throws IOException
{
super(pipedoutputstream);
buffer = new byte[LARGE_BUF_SIZE];
}
}

View file

@ -138,7 +138,8 @@ public class MIInferiorProcess extends Process
fInputStreamPiped = new PipedOutputStream();
PipedInputStream inputStream = null;
try {
inputStream = new PipedInputStream(fInputStreamPiped);
// Using a LargePipedInputStream see https://bugs.eclipse.org/bugs/show_bug.cgi?id=223154
inputStream = new LargePipedInputStream(fInputStreamPiped);
} catch (IOException e) {
}
fInputStream = inputStream;
@ -150,7 +151,8 @@ public class MIInferiorProcess extends Process
fErrorStreamPiped = new PipedOutputStream();
PipedInputStream errorStream = null;
try {
errorStream = new PipedInputStream(fErrorStreamPiped);
// Using a LargePipedInputStream see https://bugs.eclipse.org/bugs/show_bug.cgi?id=223154
errorStream = new LargePipedInputStream(fErrorStreamPiped);
} catch (IOException e) {
}
fErrorStream = errorStream;