Core::OutputWindow: Prevent UI thread overload

... by splitting up huge amounts of output and feeding it to the
formatter in more digestable chunks, with event processing in between.
This prevents a UI freeze in the case that a single file emits a large
amount of diagnostics and the build tool buffers the output (as ninja
and qbs do), which therefore comes in all at once.
Apart from keeping the UI responsive, this also speeds up execution of
the build step itself, as the remaining output can now be displayed
after it has finished. If another build step is started and there is too
much output pending to flush all at once, we discard the pending output,
in order to prevent the delay to accumulate.

Fixes: QTCREATORBUG-23944
Task-number: QTCREATORBUG-22914
Change-Id: I7cfef939a85bbd13730f607b0f83c36473b0e550
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2020-04-29 13:37:36 +02:00
parent 4b0f326bd9
commit 37ce45c21e
5 changed files with 84 additions and 10 deletions

View File

@@ -78,6 +78,7 @@ public:
void showPositionOf(const Task &task);
void flush();
void reset();
const CompileOutputSettings &settings() const { return m_settings; }
void setSettings(const CompileOutputSettings &settings);