Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 May 2019 04:51:44 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 234949] Strip is enormously slow when operating on Haskell binaries
Message-ID:  <bug-234949-227-IwMqVW4WMn@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-234949-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-234949-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D234949

--- Comment #13 from Mark Johnston <markj@FreeBSD.org> ---
Created attachment 204641
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D204641&action=
=3Dedit
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/bu=
ild/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/bu=
ild/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.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-234949-227-IwMqVW4WMn>