You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, importing workalendar.registry imports all regions. This wastes time and memory when most programs will work with a handful of regions. It would be nice if workalendar could lazily import modules as requested.
Here's my import time profiling with python -Ximporttime (blog post), where you can see the long list of workalendar region modules taking significant time.
Currently, importing
workalendar.registry
imports all regions. This wastes time and memory when most programs will work with a handful of regions. It would be nice if workalendar could lazily import modules as requested.Recently the python-holidays project made a similar change: https://github.com/dr-prodigy/python-holidays/issues/998 . They halved their import time, leaving most in standard library modules.
Here's my import time profiling with
python -Ximporttime
(blog post), where you can see the long list of workalendar region modules taking significant time.python -X importtime -c 'import workalendar'
The text was updated successfully, but these errors were encountered: