[lldb-vscode] only report long running progress events
authorWalter Erquinigo <a20012251@gmail.com>
Fri, 30 Apr 2021 04:27:12 +0000 (21:27 -0700)
committerWalter Erquinigo <wallace@fb.com>
Tue, 22 Jun 2021 02:35:05 +0000 (19:35 -0700)
commit610d474cfd82f11dc4702e2cf1b2485584d7c243
treed82343fc9e3dbaaaa513e06ff644324e11e80cf8
parent74909e4b6e9bc0da6c197cf6c4419991a8dc335f
[lldb-vscode] only report long running progress events

When the number of shared libs is massive, there could be hundreds of
thousands of short lived progress events sent to the IDE, which makes it
irresponsive while it's processing all this data. As these small jobs
take less than a second to process, the user doesn't even see them,
because the IDE only display the progress of long operations. So it's
better not to send these events.

I'm fixing that by sending only the events that are taking longer than 5
seconds to process.
In a specific run, I got the number of events from ~500k to 100, because
there was only 1 big lib to parse.

I've tried this on several small and massive targets, and it seems to
work fine.

Differential Revision: https://reviews.llvm.org/D101128
lldb/tools/lldb-vscode/ProgressEvent.cpp
lldb/tools/lldb-vscode/ProgressEvent.h
lldb/tools/lldb-vscode/VSCode.cpp
lldb/tools/lldb-vscode/VSCode.h
lldb/tools/lldb-vscode/lldb-vscode.cpp