Navigation
Recherche
|
[$] Lazy imports for Python
mercredi 7 septembre 2022, 18:33 , par 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/
|
56 sources (32 en français)
Date Actuelle
sam. 4 mai - 11:47 CEST
|