You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LndGrpc.hs file generated by proto-lens-protoc plugin is too big (3.01 MB). This causes compilation failure on my laptop (8 GB RAM). On machines with bigger RAM capacity it still takes a while to compile this file, but at least it works.
Any ideas how to fix this? Split .proto source file into multiple source files? Use some special GHC flags? Optimize proto-lens-protoc? Something else?
The text was updated successfully, but these errors were encountered:
14:55 < timCF> Hello! I have a huge Haskell source code file generated by `proto-lens-protoc` protobuf plugin from very big Google Protobuf document. The size of resulting Haskell file is
something around 3MB. And I did found out that GHC 8.6.5 fails to compile this file on relatively weak laptops (8GB RAM) with default settings. But it compiles quite ok on
machines with bigger RAM capacity. What can you suggest to
14:55 < timCF> workaround this issue? Maybe there are some magical GHC flags to reduce RAM consumption? Or I should just invest into GHC upgrade in my project?
14:55 -!- bitdex [~bitdex@gateway/tor-sasl/bitdex] has quit [Quit: = ""]
14:55 < dminuoso> Invest into more RAM? :-p
14:56 < merijn> That, yes :p
14:56 < timCF> Haha :)
14:56 < merijn> Or patch proto-lens-protoc to produce more GHC friendly output
14:56 < merijn> There's work on optimising GHCs memory usage/compile times, but that's hard work and will take a while to actually improve things (and only in newer GHCs)
14:57 < merijn> So "buy more RAM" and "change the generated code" are the only really short-term options you have
14:57 -!- peterhil [~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi] has quit [Ping timeout: 272 seconds]
14:58 < timCF> Do you remember significant improvements on RAM consumption with GHC 9 upgrade? I just didn't tried latest versions of compiler. Is it better?
14:58 < merijn> I can't remember, because I'm still using 8.10 :p
14:58 -!- Atum_ [IRC@user/atum/x-2392232] has quit [Ping timeout: 258 seconds]
14:59 < timCF> Well, things like compilers usually are getting better over time :)
14:59 < hpc> i like the technical correctness of saying "i can't remember" about something that hasn't happened yet
14:59 < dminuoso> GHC hasn't really received any updates recently that majorly change how many resources it consumes.
14:59 < dminuoso> Aside from bug fixes of course
14:59 < merijn> hpc: Technically correct is the best kind of correct :p
LndGrpc.hs file generated by
proto-lens-protoc
plugin is too big (3.01 MB). This causes compilation failure on my laptop (8 GB RAM). On machines with bigger RAM capacity it still takes a while to compile this file, but at least it works.https://github.com/coingaming/lnd-client/blob/e2218e41d971f29adf6d63f80f6feaf032e4cb3e/src/Proto/LndGrpc.hs
Steps to reproduce:
Any ideas how to fix this? Split
.proto
source file into multiple source files? Use some special GHC flags? Optimizeproto-lens-protoc
? Something else?The text was updated successfully, but these errors were encountered: