Re: 2x file listings, comments
Denis Corbin <[email protected]> Mon, 23 Jul 2007 21:24:05 +0200
| Newsgroups | gmane.comp.sysutils.backup.dar.general |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 David Fries wrote: > I started coding up the user and group as a cache system, but if I did > complete it that way I didn't keep that version. I figured it would > be better to parse /etc/passwd once rather than a bunch of times, and > the more the users the longer it would take to parse. yes, that's right. > I hear some > systems (OpenBSD) have their password information in a database, so I > could see caching be better there. > Well, seen your arguments and as this optimization could be disabled from the configure script, It seems better to forget about the cache. I suspect that the vaste majority of users don't use NIS(+) and will have a /etc/password file with less then 50 entries... for the other user that use NIS(+), some will not have that much users neither, while some other could have huge user and group database instead. For those few later ones, either they could afford the memory overhead or they could disable this optimization from the configure script. So we keep your patch as is. Well with some modifications, because the use of static variable inside a function is not thread-safe. Having mutex around would slow down the work greatly. I thus find that having a additional parameter that carries the user or group database will make it right, efficient and thread-safe. Thanks for your feedback. Regards, Denis. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGpQBVpC5CI8gYGlIRArrlAKCcxKhfHTKcT6uR2nKN1IP0S/nkZACfXwif wrmQqWrTdZ9j7XADuFaWyJM= =jxfw -----END PGP SIGNATURE----- ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/