Right. Because every time you sleep, you sleep for 100 ms.
That's why I was saying that you need to add polling to the thing. I don't
know what the QT interfaces to asynchronous polling file descriptors are,
but as long as you just blindly wait for 100ms whenever you run out of
data, things will always suck.
Using "fread()" hid this problem, because the thing would block in
fread(), and thus you'd nor see as many of these events.
How about you just compare something simpler:
git-rev-list | cat > /dev/null
vs
git-rev-list > tmpfile ; cat tmpfile > /dev/null
and see which one works better.
If the pipe works better, that means that it's your code that is buggy and
broken.
Which gets us back to the basic issue: you're asking for a bad interface.
This is your problem:
rather than just blindly starting a timer, you should ask it to wait until
more data is available.
Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html