mirror of
https://github.com/rommapp/romm.git
synced 2026-10-12 02:21:58 +00:00
Importing any handler.auth submodule ran the package __init__, which built the auth handlers and so loaded authlib, joserfc and Socket.IO. models.user imports handler.auth.constants, so every process that touched the models paid for the whole auth stack. The handler instances now live next to their classes in handler.auth.base_handler. utils.context imported fastapi only for annotations; that import now sits under TYPE_CHECKING. An idle RQ worker drops from about 118 MB to 89 MB RSS. Each job's forked work horse now imports a little more on its own, about 0.2s on an x86 host. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gh1SRMfuK7BZmf6YxMqSyT