-
-
Notifications
You must be signed in to change notification settings - Fork 337
-
I had a single endpoints.py file with all my endpoints in it, but it got to be unmaintainable. So I split it into several files. Now I load it this way:
# Get all submodules in the endpoints package
endpoint_modules = []
for _, name, _ in pkgutil.iter_modules(jetway.endpoints.__path__, jetway.endpoints.__name__ + "."):
try:
endpoint_modules.append(importlib.import_module(name))
except ImportError:
pass
logger.info("Wiring services...")
container.wire(
modules=endpoint_modules
+ [
__name__,
]
)
The problem is that wiring went from ~1 sec to ~2.5 on my MacBook Pro M2! No logic changed.
Any ideas what is going on or steps on how to debug? 2.5 seconds to wire everything seems super slow...
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment