I'm using a QProcess to call an external application. I also have to read and parse the output of that program.

The problem is that when the external program outputs a lot of messages (several lines per second), the external program slows down (the external program is a media player, so this is unacceptable).

Maybe my application is not fast enough to process the output and the QProcess buffer fills.

I thought on optimize the function that parses the lines, but the problem is that even not doing nothing, just reading the buffer with readStdout, just that, it already produces the slow down. So it seems that the bottleneck is in QProcess.

This only happens on Windows, tested with Qt 4.2.2 and 4.2.3. On linux it doesn't happen at all (tested with Qt 3.3 and 4.2.3).

To maintain compatibility with Qt 3 I'm using a Q3Process but I tried to convert the code to use a Qt4 QProcess and the result is the same (or even worse).

I don't know how to fix this important problem.

Is there any way to tell QProcess to use a bigger buffer, maybe?