call stat less often on krb5.conf
authorKen Raeburn <raeburn@mit.edu>
Sat, 30 Oct 2004 05:43:18 +0000 (05:43 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sat, 30 Oct 2004 05:43:18 +0000 (05:43 +0000)
commit8a3056e4865063e4b2c2dce9d3316ae5526839da
tree21c27ce916fb938f9266e7c95b800d26c641b946
parent78a29e652aeb95c0853c14c9ad4c44fc7952aff9
call stat less often on krb5.conf

Changes suggested by lxs to reduce stat frequency to once per second.
In parallel loops creating and destroying krb5 contexts on Mac OS X, this
seems to improve performance by 10%, though it's hard to be sure because
the times are variable.

* prof_int.h (STAT_ONCE_PER_SECOND): Define.
(struct _prf_data_t) [STAT_ONCE_PER_SECOND]: New field LAST_STAT.
* prof_file.c (scan_shared_trees_locked, scan_shared_trees_unlocked): Redefine
to do nothing for now.
(profile_update_file_data) [STAT_ONCE_PER_SECOND]: If the current time is the
same time as the last stat of the file, just return; otherwise, save away the
current time.

ticket: new
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16847 dc483132-0cff-0310-8789-dd5450dbe970
src/util/profile/ChangeLog
src/util/profile/prof_file.c
src/util/profile/prof_int.h