Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve require time by using useAutoload: true #1061

Closed
technicalpickles opened this issue Sep 2, 2022 · 3 comments
Closed

Improve require time by using useAutoload: true #1061

technicalpickles opened this issue Sep 2, 2022 · 3 comments

Comments

@technicalpickles
Copy link

technicalpickles commented Sep 2, 2022

Note:
If you have a feature request, you should contact support so the request can be properly tracked.

Is your feature request related to a problem? Please describe.
This library has a lot of ruby files required. This takes time even if the library isn't used. This adds up when you have multiple libraries that use OpenAPI. In our application, this takes 0.3s on an M1 at Rails boottime.

Describe the solution you'd like

OpenAPI added an option useAutoload which switches to autoload. That way, files are only required when they use access a client.

Describe alternatives you've considered
I tried manually changing this previously before realizing this was auto-generated #537

Additional context

OpenAPITools/openapi-generator#12648
OpenAPITools/openapi-generator#13153

@skarimo
Copy link
Member

skarimo commented Sep 2, 2022

👋 We recently introduced autoloading with the zeitwerk library in the V2 version of the client. See #989

@technicalpickles
Copy link
Author

That's great! Is there something similar in V1 already? We have some usage of it still.

@therve
Copy link
Contributor

therve commented Sep 2, 2022

This is the v2 of the client, but it contains both the v1 and v2 versions of our API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants