Adopting Python 3.15's lazy imports: a 4× faster CLI, and where they didn't help
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
Namegarage, a domain-trading company, moved its back office to Python 3.15.2 and used explicit lazy imports (PEP 810) to cut start-up time. Median CLI --help fell from 1,314 ms to 326 ms, while the terminal UI improved 20 percent and the MCP server import 15 percent. These are the company's own measurements on a busy Mac. It gated deferral with Meta's Lifeguard analyzer, avoided global lazy mode, and found that table values, default arguments, base classes and try blocks quietly defeat deferral.