Navigation
Search
|
[$] Lazy imports for Python
Wednesday September 7, 2022. 06:33 PM , from LWN.net
Starting a Python application typically results in a flurry of imports as
modules from various locations (and the modules they import) get added into the application process. All of that occurs before the application even gets started doing whatever it is the user actually launched it for; that delay can be significant—and annoying. Beyond that, many of those imports may not be necessary at all for the code path being followed, so eagerly doing the import is purely wasted time. A proposal back in May would add a way for applications to choose lazy imports, where the import is deferred until the module is actually used.
https://lwn.net/Articles/907226/
|
25 sources
Current Date
Apr, Thu 25 - 02:24 CEST
|