Re: [patch] massive libtool speedup for large libs
Re: [patch] massive libtool speedup for large libs
- Subject: Re: [patch] massive libtool speedup for large libs
- From: Jonas Maebe <email@hidden>
- Date: Thu, 1 Mar 2007 13:13:56 +0100
On 1 mrt 2007, at 10:58, Olivier Tristan wrote:
Scott Wheeler wrote:
I reworked create_library() to skip the buffer stage and write
directly
to the target file. In the case above this knocks out about 60%
of the
runtime and leaves the system at least semi-responsive. There are
other places that could be optimized, but the major bottleneck at
this point
is just writing the library to disk. I did binary diffs on the
output
of the system version and my own and the only different bytes are the
time stamp.
It would be definitely great if this could be integrated in Xcode 3.0.
We suffer from the same problem and it looks very promising.
Note that judicious use of plain writes without internal caching can
also have a quite detrimental effect on speed. E.g, Apple's ld64 does
that (in 10.4 at least) and it's really a lot slower than the regular
ld (which seems to write in blocks of at least 32KB). ld64 moreover
even does a lot of zero-byte writes (from fs_usage):
13:03:24.539 pwrite F=3 B=0x0 O=0x00002230 0.000002
ld64
13:03:24.539 pwrite F=3 B=0x20 O=0x00002230 0.000006
ld64
13:03:24.539 pwrite F=3 B=0x0 O=0x00002250 0.000002
ld64
13:03:24.539 pwrite F=3 B=0x20 O=0x00002250 0.000006
ld64
13:03:24.539 pwrite F=3 B=0x0 O=0x00002270 0.000002
ld64
13:03:24.539 pwrite F=3 B=0x20 O=0x00002270 0.000006
ld64
13:03:24.539 pwrite F=3 B=0x0 O=0x00002290 0.000002
ld64
13:03:24.539 pwrite F=3 B=0x30 O=0x00002290 0.000006
ld64
13:03:24.539 pwrite F=3 B=0x0 O=0x000022c0 0.000002
ld64
13:03:24.539 pwrite F=3 B=0x20 O=0x000022c0 0.000006
ld64
13:03:24.539 pwrite F=3 B=0x0 O=0x000022e0 0.000002
ld64
13:03:24.539 pwrite F=3 B=0x20 O=0x000022e0 0.000006
ld64
13:03:24.539 pwrite F=3 B=0x0 O=0x00002300 0.000002
ld64
13:03:24.539 pwrite F=3 B=0x20 O=0x00002300 0.000006
ld64
13:03:24.539 pwrite F=3 B=0x0 O=0x00002320 0.000002
ld64
13:03:24.539 pwrite F=3 B=0x20 O=0x00002320 0.000006
ld64
13:03:24.539 pwrite F=3 B=0x0 O=0x00002340 0.000002
ld64
13:03:24.539 pwrite F=3 B=0x30 O=0x00002340 0.000006
ld64
13:03:24.539 pwrite F=3 B=0x40 O=0x00002370 0.000006
ld64
13:03:24.539 pwrite F=3 B=0x40 O=0x000023b0 0.000006
ld64
But even without the zero byte writes, performing a system call for
writing anything less than 32KB or so is asking for slow performance.
Yes, I still have to file a radar for this (although I'm hesitant to
spend time on it, since I suppose that ld64 will have gained
significant improvements in 10.5 given that it's much more used there).
Jonas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden