jorgenschaefer / emacs-buttercup

Behavior-Driven Emacs Lisp Testing
GNU General Public License v3.0
360 stars 44 forks source link

Skipping tests makes Buttercup slower compared to running them #205

Closed doublep closed 2 years ago

doublep commented 3 years ago

To see it you can just use Buttercup's own tests:

~/git/buttercup$ ./bin/buttercup -L . | tail -n1
Ran 212 specs, 0 failed, in 77.75ms.
~/git/buttercup$ ./bin/buttercup -L . -p search | tail -n1
Ran 1 out of 212 specs, 0 failed, in 1.06s.

Slowdown of ~15 times.

Naturally, one would expect that not running something is faster than running it.

doublep commented 3 years ago

Looks like this is caused by function buttercup--backtrace being called even for skipped tests, probably to pointlessly format backtrace of skipping signal. This is probably why slowdown is more pronounced when executing from under Eldev, especially not byte-compiled: backtraces are longer.