beam
beam copied to clipboard
defaultDbSettings slow to build in release mode
Changing this line:
folq :: DatabaseSettings be Folq
folq = defaultDbSettings
to
folq :: DatabaseSettings be Folq
folq = undefined
saves about 40 seconds of build time on my machine. Here Folq is a database with around 20 tables. If I build without optimisation (by passing --fast to Stack) it only saves about a second, which I can live with.
Is there any way to speed this up?
Cheers!
It seems likely that this is due to the general problem that GHC is slow at handling generics, and therefore that the problem is not Beam-specific. I had a look at the -ddump-simpl output from the definition, and it's got huge generic type representations in it, which perhaps points in that direction.
I would still be interested in hearing if there are any coping strategies, though.
I've been experimenting with INLINEing which actually reduces the code by getting rid of some of the intermediate representations in the core. I'll have to run some benchmarks though.
Cool! Let me know if I can help test anything.