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

Very large proto file takes a long time to compile #66

Open
fireyang opened this issue Apr 15, 2017 · 6 comments
Open

Very large proto file takes a long time to compile #66

fireyang opened this issue Apr 15, 2017 · 6 comments

Comments

@fireyang
Copy link

Contains a large number of message proto file, compiled very slowly

@bitwalker
Copy link
Owner

Do you have an example file I can test with? How many messages are defined in the proto?

@bitwalker bitwalker changed the title a large proto file compile slow Very large proto file takes a long time to compile Apr 19, 2017
@fireyang
Copy link
Author

fireyang commented May 3, 2017

https://github.com/fireyang/exprotobuf_performance
40 message and 3 enum; Add a new message every time recompile all

@bitwalker
Copy link
Owner

Thanks! I'll take a look as soon as possible

@dweinstein
Copy link

@bitwalker
Copy link
Owner

It looks like the bulk of the time is split between gpb parsing and the Elixir compiler - ultimately there isn't much I can do to ease this with the current architecture.

I'm not sure if there is anyway to generate the Elixir source such that compilation is meaningfully faster (at least from a clean state), however one approach would be to generate Elixir source files, and which are then subsequently compiled. This is how one consumes gpb directly, and I am interested in going that route, because it would be much easier to ensure that only those things which actually changed are recompiled.

I'm considering a rewrite of exprotobuf for that reason, amongst others, but time is elusive, so I haven't been able to take a good crack at it yet.

@mustafaturan
Copy link

mustafaturan commented May 12, 2018

@bitwalker Would you please consider to use enif_protobuf? It looks it is at least 3 times faster than gbp

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

4 participants