Skip to content

Improve require time by using useAutoload: true #1061

Closed

Description

@technicalpickles

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

Activity

  1. skarimo commented on Sep 2, 2022

    @skarimo
    Member

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

  2. technicalpickles commented on Sep 2, 2022

    @technicalpickles
    Author

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

  3. therve commented on Sep 2, 2022

    @therve
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions