[pacman-dev] [PATCH] Avoid stat call to determine is_directory if possible
Dan McGee
dpmcgee at gmail.com
Tue Oct 5 18:37:46 EDT 2010
On Tue, Oct 5, 2010 at 5:13 PM, Dan McGee <dpmcgee at gmail.com> wrote:
> And looking closer at my numbers, did we not lose time here? If you
> through the read() calls out (which I left in only because that was
> the top time user), I should do some new timings or someone else
> should as well...
Slower it is! Non-truncated test output below after two warm up runs of each.
$ strace -c pacman -Ss pacman >/dev/null
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
21.41 0.000764 0 11056 23 open
20.15 0.000719 0 21733 read
19.53 0.000697 0 17602 1 access
11.27 0.000402 0 11054 mmap
9.84 0.000351 0 11009 munmap
7.17 0.000256 0 6608 3 stat
5.89 0.000210 0 11026 fstat
4.74 0.000169 0 11033 close
0.00 0.000000 0 1 write
0.00 0.000000 0 19 mprotect
0.00 0.000000 0 55 brk
0.00 0.000000 0 8 rt_sigaction
0.00 0.000000 0 1 rt_sigprocmask
0.00 0.000000 0 13 13 ioctl
0.00 0.000000 0 1 execve
0.00 0.000000 0 2 uname
0.00 0.000000 0 1 fcntl
0.00 0.000000 0 20 getdents
0.00 0.000000 0 1 getrlimit
0.00 0.000000 0 1 geteuid
0.00 0.000000 0 1 arch_prctl
0.00 0.000000 0 3 1 futex
0.00 0.000000 0 1 set_tid_address
0.00 0.000000 0 1 set_robust_list
------ ----------- ----------- --------- --------- ----------------
100.00 0.003568 101250 41 total
dmcgee at galway ~/projects/pacman (master)
$ strace -c ./src/pacman/.libs/lt-pacman -Ss pacman >/dev/null
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
19.29 0.000790 0 21733 read
17.80 0.000729 0 17602 1 access
15.85 0.000649 32 20 getdents
15.14 0.000620 0 11009 munmap
11.33 0.000464 0 11072 39 open
7.20 0.000295 0 11033 close
6.74 0.000276 0 11026 fstat
6.64 0.000272 0 11054 mmap
0.00 0.000000 0 1 write
0.00 0.000000 0 9 6 stat
0.00 0.000000 0 19 mprotect
0.00 0.000000 0 53 brk
0.00 0.000000 0 8 rt_sigaction
0.00 0.000000 0 1 rt_sigprocmask
0.00 0.000000 0 13 13 ioctl
0.00 0.000000 0 1 execve
0.00 0.000000 0 2 uname
0.00 0.000000 0 1 fcntl
0.00 0.000000 0 1 getrlimit
0.00 0.000000 0 1 geteuid
0.00 0.000000 0 1 arch_prctl
0.00 0.000000 0 3 1 futex
0.00 0.000000 0 1 set_tid_address
0.00 0.000000 0 1 set_robust_list
------ ----------- ----------- --------- --------- ----------------
100.00 0.004095 94665 60 total
More information about the pacman-dev
mailing list