Open
Description
This is crucial for #558.
Because we use mostly recursive calls, and effectively each function can call each other function, I suspect it is difficult to see where exactly styler spends most of its time, and which parts perhaps should be optimized. Can you confirm that?
To work around, I propose processing the .Rprof
files created from a profiler run. If we erase the right places from the call stack for each sample, we might just end up with a clean flat structure that immediately shows where the time is spent. What do you think?
Alternatively, we could (temporarily) replace the recursive calls with later::later()
or replace recursion with a queue and a while {}
loop. Editing the call stack sounds like less work.