Quit is a core task repeated many times in any debugging/development cycle. Its efficiency is therefore important and yet in my set-up it is taking somewhere between 4-10s to complete. This seems excessive. Why is it taking so long and what strategies can be employed to minimise this time?
I've observed the lower bound of 4s for a "clean"
Quit, 8s when all my "init" packages are loaded and sometimes >10s following a long session. I also wonder by how much this varies from system-to-system and/or version-to-version? (timings above for V12.1.1, 2018 MacBook Pro, macOS 10.15.6).
As a benchmark to keep tabs on this timing, the following shows Launch and
Quit times (in seconds) for both "Clean" (no packages loaded, no other notebooks open) and "PackagesLoaded" scenarios.
Hence the resolution of the above shows that the time to
Quit is actually pretty consistent and reasonable irrespective of current state. Hence, anything beyond a 0.5s
Quit time suggests an issue or perhaps is an indication that an automatic kernel has re-launched for some reason, possibly as catalogued in my answer.