XeroAPI / xero-ruby

Xero Ruby SDK for OAuth 2.0 generated from XeroAPI/Xero-OpenAPI
http://developer.xero.com/
MIT License
58 stars 91 forks source link

Improve require time by using `useAutoload: true` #230

Open technicalpickles opened 2 years ago

technicalpickles commented 2 years ago

Requiring xero-ruby can take quite awhile because of the number of classes and modules. This time adds up especially for apps that use multiple OpenAPI generated libraries. https://github.com/OpenAPITools/openapi-generator/issues/12648 describes it well.

There is a fairly recently feature to switch requires to using autoload which don't actually load until a constant is used: https://github.com/OpenAPITools/openapi-generator/pull/13153

I'm not familiar enough with OpenAPI to know where to configure this though or I'd put together a PR>