EngineHelp WantedOptimizationPerformance
説明
Describe the Improvement
While investigating https://github.com/directus/directus/issues/24035 I found multiple packages being loaded into memory even if they were not being in use.
The most impactful package was node-xmllint from @authenio/samlify-node-xmllint even though I was not using SAML. But others like openid-client or ldapjs were being loaded as well, but my configuration was not using OpenId or LDAP.
To reduce the memory usage, we could lazy load these and all other packages that are not required if respective configuration is not active. For example, lazy load @tus/server and only import it if TUS_ENABLED is set to true