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
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...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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:
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