[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/2467] New: "ar q" gives quadratic memory use

From: dcoutts at gentoo dot org
Subject: [Bug binutils/2467] New: "ar q" gives quadratic memory use
Date: 16 Mar 2006 19:43:40 -0000

When building an arhive with lots of .o files (eg over 10,000) GNU ar takes a
very long time and lots of memory.

One might hope that the 'q' "quick append" option might operate in linear time
and constant memory (since all it needs to do is to append to the archive
without looking at the existing entries). However the GNU ar man page says that
it is an alias for the 'r' option and so the possible performance advantages of
the 'q' option are lost.

This is a real problem for building ghc on machines with little RAM
(http://haskell.org/ghc/). When building ghc's libHSbase.a (with 12746 .o
files), GNU ar takes over 500Mb of memory on my system. On machines with less
memory this operation can take many minutes.

There may be good reasons for alising the 'q' mode to 'r' however it does also
mean that it's impossible to build large archives on weaker machines.

           Summary: "ar q" gives quadratic memory use
           Product: binutils
           Version: 2.16
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: dcoutts at gentoo dot org
                CC: bug-binutils at gnu dot org


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]