This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/3 v2] Implement completion limiting


> Date: Fri, 23 Jan 2015 08:56:59 -0800
> From: Doug Evans <xdje42@gmail.com>
> Cc: Gary Benson <gbenson@redhat.com>, 
> 	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
> 
> How often will there be exactly N?

About the same frequency as there will be exactly N-1, I guess.

> And in that particular and massively rare case,
> once gdb has found N, how much extra work will
> be performed searching the entire executable
> and all its shared libraries just to verify there are
> in fact no more completions?
> [because that's what has to happen if
> we're to avoid printing *any* message]
> 
> The user waits 5 minutes for the entire list and
> gets her 200 completions, and wonders
> why it took so long.  Then she digs a bit
> deeper and finds out they were found
> in the first 5 seconds. Ugh.

200 is just a random number.  It's not magic in any way.  So you
could have 199 completions found in the first 5 sec, followed by 5
minutes of waiting for the 200th which is never found.  Ugh.

There's no way around this issue.

> I don't see the benefit of going to the trouble
> of avoiding printing any message when there are
> exactly N completions.

That's fine, but then the option's name and its documentation should
be changed to reflect this.  They currently support what I thought
user will get, not what you describe above.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]