reflex-vty icon indicating copy to clipboard operation
reflex-vty copied to clipboard

Space leaks

Open deepfire opened this issue 1 year ago • 1 comments

I have not diagnosed them in detail, but it seems that there is a family of different space leaks in at least reflex-vty.

The reproduction is at:

https://github.com/deepfire/hasdiff/blob/repro-reflex-vty-leak/hasdiff/app/hasdiff.hs

Observations:

  1. Eliminating the layout manager and combinators makes the leak slower -- which points to the fact there is more than one involved.
  2. Eliminating the rendering functions altogether (yet retaining the mainWidget call) makes the leak slower futher still.
  3. In any case, commenting out the threadDelay turns the program into an instakill memory hog.

NB: you can use nix develop or nix develop .#profiling to enter the reproduction shell. Which runs ghc-9.10.1, btw.

deepfire avatar Oct 30 '24 02:10 deepfire

@deepfire thanks for the report and the repro code. I'll be looking into this!

ali-abrar avatar Oct 30 '24 13:10 ali-abrar