-
Notifications
You must be signed in to change notification settings - Fork 97
Conversation
I've used similar GC tweaks on Shake, and find they are usually super helpful. Can you give any stats about your code base? I'm looking to use ghcide on a pretty huge codebase, and curious to know if it's going to work. I'm wondering if some kind of hi file, paging stuff out, is going to be required at larger sizes? |
We have ~1300 Haskell modules and 300 packages in the ghc pkg dB. Using ghc 8.6.5 so haven’t tried hie files yet, ghcide takes several minutes to boot Some of us coming to the Bristol Hackathon are planning to work on reducing the memory usage by increasing sharing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks you, I've seen a small speed up due to these flags on the relatively small ghcide code base as well.
@pepeiborra Have you done any space profiling to work out what the big memory hogs are? |
@mpickering I have collected some space profiles in our work repo which show that a large portion of the heap is used by GHC data structures, including Types and Spans. Instead of sharing those though, it might be better to collect space profiles done on GHC itself. I've been trying to do that but given up on loading GHC in ghcide. Do you have any insights? See https://gitlab.haskell.org/pepeiborra/ghc/commit/4f4b83d261691fd6872218c9d68976cafb6b3267 |
@pepeiborra Why do your changes to the files not work? |
I got ghcide to load GHC successfully after deleting the |
You probably need to also enable profiling for the project you are trying to profile which would require modifying the hadrian build flavour to build profiling versions of the libraries. |
ghcide uses a lot of memory in large codebases. In ours it starts at 7GB and goes up to 30GB quite easily. Needless to say, GC settings have a huge impact. Disabling the idle GC alone cuts up to 4s for hovers.