From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14326 invoked by alias); 5 Jan 2002 18:20:42 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14282 invoked from network); 5 Jan 2002 18:20:40 -0000 Received: from unknown (HELO gash2.peakpeak.com) (207.174.178.17) by sources.redhat.com with SMTP; 5 Jan 2002 18:20:40 -0000 Received: from creche.cygnus.com (ta0204.peakpeak.com [204.144.244.204]) by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id LAA04004; Sat, 5 Jan 2002 11:20:28 -0700 Received: (from tromey@localhost) by creche.cygnus.com (8.9.3/8.9.3) id LAA17970; Sat, 5 Jan 2002 11:32:58 -0700 To: Daniel Berlin Cc: Eli Zaretskii , Subject: Re: Patch: completion -vs- duplicates References: From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom X-Zippy: Should I start with the time I SWITCHED personalities with a BEATNIK hair stylist or my failure to refer five TEENAGERS to a good OCULIST? Date: Sat, 05 Jan 2002 10:20:00 -0000 In-Reply-To: Daniel Berlin's message of "Sat, 5 Jan 2002 10:43:57 -0500 (EST)" Message-ID: <87k7uw1wdh.fsf@creche.redhat.com> X-Mailer: Gnus v5.7/Emacs 20.5 X-SW-Source: 2002-01/txt/msg00072.txt.bz2 >>>>> "Daniel" == Daniel Berlin writes: Eli> The rest--how to display the candidates, whether to filter out Eli> duplicates, etc.--is up to the UI's completion machinery. It always makes sense to filter duplicates when doing textual completion. What value can there be in completing to the second of two identical items? Eli> Concepts aside, the change you suggest has also practical Eli> disadvantages: filtering duplicates in GDB's completion function Eli> would mean a performance hit in the CLI version, since readline Eli> will try to filter again. Daniel> Yes. I remember this was the huge lose that caused completion Daniel> to take forever, which is why I removed the duplicate Daniel> filtering. I'm surprised it is that important. I'll write an Insight patch instead. Daniel> I'm surprised you insight guys didn't notice then, actually. I probably did. The bug has been around for a long time. I submitted an Insight PR way back, which yesterday Keith replied to with a note saying that it was a gdb bug. I still think having the `complete' command print duplicates is not optimal. Suppose you're writing a GUI that wraps gdb. In this case you're sending 100x more data over the connection than is necessary. Pruning duplicates in the `complete' command is probably appropriate. Tom