[Bug 234949] Strip is enormously slow when operating on Haskell binaries

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon May 27 04:51:47 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234949

--- Comment #13 from Mark Johnston <markj at FreeBSD.org> ---
Created attachment 204641
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=204641&action=edit
proposed patch

It turns out that libelftc provides some ELF string table routines which are
more efficient than what strip uses today.  With all of my diffs combined I
get:

> time strip ghc-8.6.2/libraries/Cabal/Cabal/dist-install/build/libHSCabal-2.4.0.1.a

real    0m6.817s
user    0m6.428s
sys     0m0.135s
> time strip ghc-8.6.2/libraries/Cabal/Cabal/dist-install/build/libHSCabal-2.4.0.1_p.a

real    0m8.674s
user    0m8.185s
sys     0m0.155s

vs. GNU strip:

> time /usr/local/bin/strip ghc-8.6.2/libraries/Cabal/Cabal/dist-install/build/libHSCabal-2.4.0.1.a

real    0m2.671s
user    0m2.334s
sys     0m0.245s

> time /usr/local/bin/strip ghc-8.6.2/libraries/Cabal/Cabal/dist-install/build/libHSCabal-2.4.0.1_p.a

real    0m4.161s
user    0m3.599s
sys     0m0.351s

So there's clearly still room for improvement.

I did not test my changes extensively yet, but I attached a combined patch if
anyone else is interested in testing them with ports builds.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list