console.log
and log
take 5 seconds to execute each time they are called.
Pasting the following into the "run script" pane in sketch:
log('blah')
log('blah')
results in:
blah
blah
Script executed in 10.090717s
Is there a better thing to do here? I've hijacked the log to just gather it all up and spit it out at the end, basically something like this:
const finalLog = [];
const log = (msg) => finalLog.push(msg, '\n');
// all my code
log('blah')
log('blah')
log('blah')
log('blah')
console.log(...finalLog);
Which results in:
blah
blah
blah
blah
Script executed in 5.044943s
Is this really the best way? Or is there some other method of outputting to some console somewhere that doesn't block execution for a full 5 seconds every time you do it?
Thanks!