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:
parent
060864a934
commit
9fd5e0d9eb
3 changed files with 26 additions and 4 deletions
|
@ -101,10 +101,11 @@ public abstract class AbstractCLIProcess extends Process
|
||||||
PipedOutputStream miOutLogPipe = null;
|
PipedOutputStream miOutLogPipe = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// Using a LargePipedInputStream see https://bugs.eclipse.org/bugs/show_bug.cgi?id=223154
|
||||||
miOutConsolePipe = new PipedOutputStream();
|
miOutConsolePipe = new PipedOutputStream();
|
||||||
miInConsolePipe = new PipedInputStream(miOutConsolePipe);
|
miInConsolePipe = new LargePipedInputStream(miOutConsolePipe);
|
||||||
miOutLogPipe = new PipedOutputStream();
|
miOutLogPipe = new PipedOutputStream();
|
||||||
miInLogPipe = new PipedInputStream(miOutLogPipe);
|
miInLogPipe = new LargePipedInputStream(miOutLogPipe);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
ILog log = MIPlugin.getDefault().getLog();
|
ILog log = MIPlugin.getDefault().getLog();
|
||||||
if (log != null) {
|
if (log != null) {
|
||||||
|
|
|
@ -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];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -138,7 +138,8 @@ public class MIInferiorProcess extends Process
|
||||||
fInputStreamPiped = new PipedOutputStream();
|
fInputStreamPiped = new PipedOutputStream();
|
||||||
PipedInputStream inputStream = null;
|
PipedInputStream inputStream = null;
|
||||||
try {
|
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) {
|
} catch (IOException e) {
|
||||||
}
|
}
|
||||||
fInputStream = inputStream;
|
fInputStream = inputStream;
|
||||||
|
@ -150,7 +151,8 @@ public class MIInferiorProcess extends Process
|
||||||
fErrorStreamPiped = new PipedOutputStream();
|
fErrorStreamPiped = new PipedOutputStream();
|
||||||
PipedInputStream errorStream = null;
|
PipedInputStream errorStream = null;
|
||||||
try {
|
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) {
|
} catch (IOException e) {
|
||||||
}
|
}
|
||||||
fErrorStream = errorStream;
|
fErrorStream = errorStream;
|
||||||
|
|
Loading…
Add table
Reference in a new issue