
More fun with Haskell-in-the-large: linking time has become the main bottleneck in our development cycle. The standard solution would be to use an incremental linker, but it seems that gnu does not yet support this:-|
Hmm, I've never heard of linking being a bottleneck. Even GHC itself links in about 3-4 seconds here. One common problem is that linking on a network filesystem takes a *lot* longer than linking objects from a local disk. It's always a good idea to keep the build tree on the local disk, even if the sources are NFS-mounted.
Alternative a: use someone else's incremental linker, e.g., Sun's ild (ghc's -pgml option appears to have its own idea about option formatting, btw) - this doesn't seem to work - should it?
You'd probably want to call the incremental linker directly rather than using GHC - what exactly does it do, BTW? What files does it generate?
Alternative b: convince ghc to link objects in stages, e.g., on a per-directory basis - gnu's ld seems to support at least this kind of partial linking (-i/-r). Not quite as nice as a fully incremental linker, but would probably save our day..
Yes, this works fine. We use it to build the libraries for GHCi. Cheers, Simon

More fun with Haskell-in-the-large: linking time has become the main bottleneck in our development cycle. The standard solution would be to use an incremental linker, but it seems that gnu does not yet support this:-|
Hmm, I've never heard of linking being a bottleneck. Even GHC itself links in about 3-4 seconds here. One common problem is that linking on a network filesystem takes a *lot* longer than linking objects from a local disk. It's always a good idea to keep the build tree on the local disk, even if the sources are NFS-mounted.
I also have this problem, and while being on a local disk rather than NFS helps, it doesn't help all that much. For large projects, I usually have time to get a cup of coffee while linking (admittedly only four doors away, but...). When on NFS, I have time to go to the local coffeehouse... - Hal

On Wed, Nov 27, 2002 at 09:50:56AM -0000, Simon Marlow wrote:
More fun with Haskell-in-the-large: linking time has become the main bottleneck in our development cycle. The standard solution would be to use an incremental linker, but it seems that gnu does not yet support this:-|
Hmm, I've never heard of linking being a bottleneck.
The runtime loader stuff I'm working on[1] takes around 10
seconds to compile ... and 3 minutes to link it with libHSbase
and libHSrts. (This is on a 500MHz PIII). Linking is a huge
bottleneck once you start linking in the Haskell libraries; ld
takes up enormous amounts of CPU time resolving symbols,
I think.
1. http://www.algorithm.com.au/wiki/hacking/haskell.ghc_runtime_loading
--
#ozone/algorithm
participants (3)
-
Andre Pang
-
Hal Daume III
-
Simon Marlow