Skip to content

perf(python): enable lazy imports - #47

Open
bubaimondalsch wants to merge 1 commit into
goauthentik:mainfrom
bubaimondalsch:patch-1
Open

bubaimondalsch wants to merge 1 commit into
goauthentik:mainfrom
bubaimondalsch:patch-1

Conversation

@bubaimondalsch

Copy link
Copy Markdown

Summary

Enable OpenAPI Generator's lazyImports option for the Python client so generated API and model modules load on demand.

Evidence

Before:

$ time python3 -c "from authentik_client.configuration import Configuration"
2.37s user 0.13s system 91% cpu 2.738 total

import time: 1607 | 2355718 | authentik_client.api
import time: 2119 | 2357865 | authentik_client
import time: 15 | 2357880 | authentik_client.configuration

After enabling lazy imports and regenerating the client:

real 0m0.121s
user 0m0.066s
sys  0m0.020s

import time: 642 | 56067 | authentik_client.configuration

Validation

  • Regenerated the client with lazyImports: true.

Related to #11.

Signed-off-by: Bubai Mondal <135795412+bubaimondalsch@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant