1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-16 06:15:08 -05:00
pacman/src/util
Dan McGee 29bf6814f7 Use access() instead of stat() when possible
We were using the stat() system call in quite a few places when we didn't
actually need anything the stat struct returned- we were simply checking for
file existence. access() will be more efficient in those cases.

Before (strace pacman -Ss pacman):
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 33.16    0.005987           0     19016           stat64

After:
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 34.85    0.003863           0     12633         1 access
  7.95    0.000881           0      6391         7 stat64

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-15 22:52:27 -05:00
..
.gitignore Add *.exe ignores for certain other platforms 2008-04-07 19:09:20 -05:00
Makefile.am Remove the DB consistency check from pacman and libalpm. 2007-09-16 20:10:18 -05:00
testdb.c Use access() instead of stat() when possible 2008-06-15 22:52:27 -05:00
testpkg.c libalpm error cleanup, step 1 2008-04-06 20:16:57 -05:00
vercmp.c Update GNU GPL boilerplate and copyright dates 2007-12-10 22:55:39 -06:00