nscd caching getpwent() and getgrent()
Nicholas Miell
nmiell@gmail.com
Sat Aug 5 00:35:00 GMT 2006
On 8/4/06, Mike Frysinger <vapier@gentoo.org> wrote:
> On Thursday 03 August 2006 22:23, Nicholas Miell wrote:
> > however I'd like to point out
> > that bash does have programmable completion and you may be able to
> > work up some hack to do user/group name caching at that level
> > (unfortunately, I don't think you can override builtin completion
> > methods, which means you can't just say "instead of using builtin user
> > completion, call this shell function instead").
>
> but that wouldnt work on nearly the same scale as nscd ... you'd get a cache
> for the active shell, but every new shell would have the same initial
> (minutes long) penalty when doing user completion
> -mike
Nothing stops you from maintaining a global cache shared by all shell processes.
I'd also like to point out that zsh's programmable completion does
allow you to override the default completion methods, which means you
could actually replace the default -tilde- context completion function
with one of your own choosing. I'm told that zsh is also superior to
bash in many other ways.
More information about the Libc-alpha
mailing list