2 ms·
It's hugely different. The issue occurs when you have something which does not need to execute in every context. Let's day you have a CLI which does some machin
by kortex 4y ago
It's hugely different. The issue occurs when you have something which does not need to execute in every context. Let's day you have a CLI which does some machine learning with several models. You don't want to execute loading every model every time you start the app.
The most egregious is when you just want to display the help/usage text and not actually execute any code at all. Instead, you have to either manually lazy import (what I usually do now), or eat huge startup costs each time you screw up the command syntax.