haskell-language-server icon indicating copy to clipboard operation
haskell-language-server copied to clipboard

link executables dynamically to speed up linking

Open develop7 opened this issue 1 year ago • 1 comments

Dramatically decreases linking times and shaves 6 of 14G off HLS' dist-newstyle directory on my machine by producing way smaller executables.

While cabal building HLS after switching a branch I've noticed linking test executables takes minutes, plural, each. Then I've checked the size of a freshly-built test binary and it was 150-something megabytes, no wonder linker took a while. With executable-dynamic enabled, linking is lightning fast and binaries are a megabyte at most, which should probably improve the developer experience and decrease the feedback loop time.

UPD: https://github.com/haskell/haskell-language-server/issues/2659 seems related, not sure how up-to-date though

develop7 avatar Oct 12 '24 11:10 develop7

I am not sure what ramification this change might have. @wz1000 or @michaelpj, what do you think? We could also try to enabling it in CI only.

fendor avatar Oct 12 '24 12:10 fendor

Thank you for the patience! We appreciate the contribution and the improved test execution times!

fendor avatar Jan 11 '25 13:01 fendor

Thank you for the patience! We appreciate the contribution and the improved test execution times!

Music to my ears! Feedback loop cannot be too short, period.

develop7 avatar Jan 11 '25 15:01 develop7