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
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Using a generated python client can be very costly with regard to import performance. For the (quite large) API-spec linked below, importing the generated client module takes ~8s and ~500MB of memory on my M1 macbook.
This issue could not be observed for versions before v7.0.0 (I tested v6.0.0 in particular) and likely is related to the switch to the pydantic generator in v7.0.0 which does not perform lazy importing (previously introduced in ee0686e) such that the (potentially quite large) module will be loaded in its entirety.
openapi-generator version
v7.8.0. Suspected to be a regression introduced in v7.0.0. Not an issue in v6.0.0.
Bug Report Checklist
Description
Using a generated python client can be very costly with regard to import performance. For the (quite large) API-spec linked below, importing the generated client module takes ~8s and ~500MB of memory on my M1 macbook.
This issue could not be observed for versions before
v7.0.0
(I testedv6.0.0
in particular) and likely is related to the switch to the pydantic generator inv7.0.0
which does not perform lazy importing (previously introduced in ee0686e) such that the (potentially quite large) module will be loaded in its entirety.openapi-generator version
v7.8.0
. Suspected to be a regression introduced inv7.0.0
. Not an issue inv6.0.0
.OpenAPI declaration file content or url
kubernetes-release-1.31.swagger.json
Generation Details
Steps to reproduce
Related issues/PRs
#18144 also concerns import performance but points at
__init__.py
.Suggest a fix
Reinstate some sort of lazy importing.
The text was updated successfully, but these errors were encountered: