While investigation slow tests, I looked into TestMultithreaded.py. One
of the reasons that it's slow is the architecture of lldb is determined:
lldb -o 'file path/to/lldb' -o 'quit'
On my fairly fast machine, this takes 24 seconds, and TestMultithreaded.py
calls this function 5 times.
With this change, this command now takes less than 0.2s on the same machine.
The reason it's slow is symbol table and debug info loading, as indicated by
the new progress events printed to the console. One setting reduced the time in
half:
settings set target.preload-symbols false
Further investigation, by profiling with Instruments on macOS, showed that
loading time was also caused by looking for scripts. The setting that
eliminates this time is:
settings set target.load-script-from-symbol-file false
Using these two settings bring this overhead down to almost zero.