gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] Re: [PATCH] arch speedups on big trees


From: Aaron Bentley
Subject: Re: [Gnu-arch-users] Re: [PATCH] arch speedups on big trees
Date: Fri, 09 Jan 2004 00:52:45 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4

Tom Lord wrote:

   > From: Aaron Bentley <address@hidden>

There's a function in `src/tla/libarch/make-change.c' called
`emit_file_or_symlink_patches' that creates the file for diff output
before figuring out if there will _be_ any diff output.  It deletes
the file if diff invocation exits with status 0.  At the same time,
the only way that diff is ever invoked, from `arch_invoke_diff',
doesn't bother to actually invoke diff unless it is certain that there
_will_ be output (this was a big performance improvement a while
back).  Simply deferring the creation of the file until it is certain
that diff will actually run will do the trick.  It's a simple
refactoring.

I've applied my own version of this idea to the 1.2 branch
address@hidden/tlasrc--local--1.2--patch-9

You can snag it at
http://sourcecontrol.net/~abentley/archives/tlasrc/ (thanks James!)

I also added a test for whether files are hard links of one another.

I benched it with three runs of "time tla changes" on copies of tlasrc--local--1.2--patch-8 that had no changes.

On normal trees, it was 1.19x faster. On hard-linked trees, it was 1.27x faster. System time was 2.3x faster. Details are attached.

On a clean, hard-linked, NFS tree, it should be much faster than vanilla tla, since it will only do 2 lstats per file in the tree, and it won't create any tmp files unless diff is required. Further refinements could remove that rename by saving it under the correct name to start with.

Aaron
Run                     Real    User    Sys
Patch-8 1               4.54    3.73    0.78
Patch-8 2               4.37    3.61    0.76
Patch-8 3               4.4     3.48    0.88
                        4.44    3.61    0.81
                        100.00% 100.00% 100.00%
                        
Patch-9 nolink 1        3.72    3.32    0.4
Patch-9 nolink 2        3.73    3.39    0.33
Patch-9 nolink 3        3.72    3.39    0.32
                        3.72    3.37    0.35
                        119.24% 107.13% 230.48%
                        
Patch-9 hardlinked 1    3.5     3.09    0.41
Patch-9 hardlinked 2    3.52    3.21    0.29
Patch-9 hardlinked 3    3.5     3.15    0.34
                        3.51    3.15    0.35
                        126.60% 114.50% 232.69%

reply via email to

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