From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29726 invoked by alias); 5 Feb 2011 17:46:45 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28709 Received: (qmail 27965 invoked from network); 5 Feb 2011 17:46:34 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110205094611.ZM26274@torch.brasslantern.com> Date: Sat, 05 Feb 2011 09:46:11 -0800 In-reply-to: Comments: In reply to cheer_xiao "Re: Slow completion when using aptitude" (Feb 5, 5:30pm) References: <87oc74dpuy.fsf@ft.bewatermyfriend.org> <87d3njemu9.fsf@ft.bewatermyfriend.org> <110126090508.ZM2111@torch.brasslantern.com> <110126092944.ZM2205@torch.brasslantern.com> <110129211610.ZM21714@torch.brasslantern.com> <110129231514.ZM21967@torch.brasslantern.com> <110130160220.ZM15815@torch.brasslantern.com> <110203065608.ZM21224@torch.brasslantern.com> <110203193315.ZM22047@torch.brasslantern.com> <110203202907.ZM22434@torch.brasslantern.com> <110204070416.ZM23211@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Slow completion when using aptitude MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Feb 5, 5:30pm, cheer_xiao wrote: } } Well, the fix is here, simpler than I thought. You missed a line here: } cachevar=_deb_packages_cache_uninstalled Yeah, as soon as you said the package list hadn't changed when the _dep -> _deb typo got fixed, I realized I'd failed to copy that assignment from the original function. } On the other hand, I think the performance can be further improved. A } delay of 1s is good enough for me but not good enough for some. There are a whole slew of completion functions that take 1s or more, so if there are people who are unhappy with this one, they're going to be unhappy in general. My response would be, consider how long it would take to get the same information if you didn't have the completion. Also the second and subsequent times you use it in the same shell, it should be as fast as it's theoretically possible for it to be without a C-code level optimization deeper in compsys, because the arrays will all have been populated already.