specialise-aggressively - Polysemy

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Torsten Schmits

So I saw that there are instructions in the readme about using -flate-specialise -fspecialise-aggressively, which I tried out.
But when the file that runs everything in IO is compiled, it takes about 13 cpu minutes and fills up the 32G ram without terminating.
Is this only feasible for smaller programs?

Torsten Schmits

interestingly, in ghci these options still have a quite noticable effect on the memory footprint, I think

nope, just a fluke

Georgi Lyubenov // googleson78

woah, I thought only -fexpose-all-unfoldings is this bad

Torsten Schmits

I'll try it on a smaller program

Georgi Lyubenov // googleson78

I've both on too and haven't noticed something that dramatic, but maybe I'm not that heavy on effect usage/code size in general

Torsten Schmits

I'd say it's about 50 effects in 350 files. not much of a benchmark but you can roughly estimate

Torsten Schmits

it looks like -fexpose-all-unfoldings is used despite not being activated by me, is that normal?

Torsten Schmits

looks like reflex-platform activates that

Georgi Lyubenov // googleson78

reflex-platform has control over your build configuration?

Torsten Schmits

yeah, it's a bit intrusive :sweat_smile: using nixpkgs' overrides thing for haskell package sets allows you to interfer wherever you want

Torsten Schmits

I'm currently splitting the project in two, isolating the frontend

Torsten Schmits

though I'm not certain that that's the cause, but it's the only place I found the option

Torsten Schmits

FTR, it's working fine without -fexpose-all-unfoldings, but the memory dynamic is the same

Georgi Lyubenov // googleson78

what do you mean? compilation terminates now?

Torsten Schmits

and by memory I mean runtime behaviour. I guess I should have mentioned that I'm trying (still) to plug memory leaks