Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Avoid LDAP hit during completion



I'll try that today. Unfortunately, it doesn't always freeze up at the first completion attempt. I though it did for the first time, but found out otherwise. It may have to do with the caching happening at the DirectoryService on Mac. It seems to always happen at the worst possible time such as doing a demo/presentation. :-)

Thanks
Chris

On Jun 7, 2005, at 2:26 AM, Peter Stephenson wrote:

Chris Wong wrote:

For some reason, whenever I start a zsh shell, the first completion
will trigger many many LDAP lookup.

% cd foo<TAB>

As soon as I hit TAB, the shell appears as frozen, but at the
background, it's hitting the LDAP server of my company network.  This
will go one for a couple minutes, at least.  tcpdump and top revealed
that mystery to me.


Are you using the new completion system (with compinit)?  The best way
of tracking this down would be to see what the completion scripts are
doing.  You can arrange this with

_comp_setup="$_comp_setup
setopt xtrace"

This produces a huge amount of output so is useless for normal
completion but you should be able to see where the shell is pausing for
a long time.

--
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************





Messages sorted by: Reverse Date, Date, Thread, Author