Disable cache patch

Havoc Pennington hp at redhat.com
Thu Sep 28 15:22:23 PDT 2006


This looks fine to me, thanks, though I'm still worried there was a good 
reason we did the caching in the first place. Maybe in benchmarking your 
glibc is set up differently from the default (or historical default)? 
I'm thinking now that when we added this, every call to get groups was 
opening and parsing /etc/groups, and this happens on *every* bus 
message.... that would probably make dbus about 100x slower than it is 

Maybe you could commit this as a nice cleanup anyhow, but with #define 
DBUS_ENABLE_USER_CACHE 1 for now, some of us can test, then we'll see 
whether we can kill caching by default. Unfortunately I don't see how to 
make this sane since there's no way to find out if getting a user's 
groups will be fast, and afaik no way to check group membership without 
getting a user's groups.

I am idly wondering if there was some reason for having the userdb 
object in the BusContext instead of using the get_system one, but I 
can't think of anything.

Be sure you try "make check" also.


More information about the dbus mailing list