-
Notifications
You must be signed in to change notification settings - Fork 460
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
STOP GENERATING THOUSANDS OF MODULES!!! #10755
Comments
Is there a plan to fix this? I'm thinking I'm just going to vendor the modules I need instead of including the full library but it feels dirty. |
I ended up ditching this library in favour of directly working with the API I needed, it worked much better. |
I experimented with this. Kind of a thought-stream as I went. But not generating a module per Model/schema seems like good bang for the buck: https://fosstodon.org/@lawik/111306047662675335 (github branch ref for ease: https://github.com/lawik/elixir-google-api/tree/lightweight-generator) Instead of modules and structs it will generate a bunch of functions and it will provide typespecs for the non-struct maps. So you still get For a fairly small API with a bunch of Models (Chat API V1) it went from 101 modules to 5. |
I've just always brought in only the sub-repos necessary (e.g. I can definitely see not wanting "everything" if you're pulling in the "root" repo though. That could be annoying. This whole repo at large feels abandoned though. |
If I generate just the AiPlatform endpoints of Google which would be one of these deps. That is about a thousand modules in schemas/models. Most of which I don't use or need. Thousand modules takes a bit to compile. |
Ah dang, that stinks |
If mix doesn't support explicitly include/excluding modules it probably should and would be a good feature to suggest in its issues. This made me realize we should have include support in rebar3/relx :). reltool supports explicit include but in rebar3/relx we only support exclude which probably isn't good enough in this situation since you'd have to list so many. |
I know the use of meta-programming is fun. But the BEAM doesn't handle loading thousands of modules very well. We have several Google libraries in our deployment Elixir and just loading Google API libraries takes over a minute!!! OVER A MINUTE for a few APIs!!!!
The text was updated successfully, but these errors were encountered: