Very slow initial expression evaluation in LLDB

In our project (~ 40.000 LOC) we experience a very slow initial expression evaluation when using commands like "po myVariable" in LLDB or breakpoint actions using @expr@: It often takes more than 20 seconds for initial evaluation, further evaulations then take only a fraction of a second.


We think this is due to the unwinding of the app context and doing a "expression -L swift -O -- myVariable" in the background, as commands like "frame variable myVariable" are much faster also on first call (~ 100 ms).

However, because of that using breakpoint actions is no fun, and as the codebase is not that big: Is there any way to determine the cause of these slow initial evaluations, e.g.

- caused by embedded (Objective-)C(++) libraries

- Access of specific frameworks like AVFoundation

- ...


Any help is appreciated.

Very slow initial expression evaluation in LLDB
 
 
Q