From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.cedet,gmane.emacs.devel Subject: Re: CEDET completion-at-point-function Date: Wed, 18 Jun 2014 21:47:08 -0400 Message-ID: References: <53717C7E.60208@siege-engine.com> <539DEC30.4050403@siege-engine.com> <53A23AD7.3050007@siege-engine.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1403142448 23329 80.91.229.3 (19 Jun 2014 01:47:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Jun 2014 01:47:28 +0000 (UTC) Cc: dgutov@gnu.org, cedet-devel@lists.sourceforge.net, emacs-devel@gnu.org To: "Eric M. Ludlam" Original-X-From: cedet-devel-bounces@lists.sourceforge.net Thu Jun 19 03:47:21 2014 Return-path: Envelope-to: sf-cedet-devel@m.gmane.org Original-Received: from lists.sourceforge.net ([216.34.181.88]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WxRRg-0007Op-KI for sf-cedet-devel@m.gmane.org; Thu, 19 Jun 2014 03:47:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WxRRc-00065Q-Vw; Thu, 19 Jun 2014 01:47:17 +0000 Original-Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WxRRa-00065I-TM for cedet-devel@lists.sourceforge.net; Thu, 19 Jun 2014 01:47:14 +0000 Received-SPF: softfail (sog-mx-3.v43.ch3.sourceforge.com: transitioning domain of iro.umontreal.ca does not designate 206.248.154.181 as permitted sender) client-ip=206.248.154.181; envelope-from=monnier@iro.umontreal.ca; helo=ironport2-out.teksavvy.com; Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]) by sog-mx-3.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1WxRRa-0001Ll-4x for cedet-devel@lists.sourceforge.net; Thu, 19 Jun 2014 01:47:14 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNLd+D9/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBJy8jBQsLNBIUGA0kiAQI0hkXjnoHhDgEqRmBaoNMIQ X-IPAS-Result: ArUGAIDvNVNLd+D9/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBJy8jBQsLNBIUGA0kiAQI0hkXjnoHhDgEqRmBaoNMIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="67924670" Original-Received: from 75-119-224-253.dsl.teksavvy.com (HELO ceviche.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 18 Jun 2014 21:47:08 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 41CED6608C; Wed, 18 Jun 2014 21:47:08 -0400 (EDT) In-Reply-To: <53A23AD7.3050007@siege-engine.com> (Eric M. Ludlam's message of "Wed, 18 Jun 2014 21:20:23 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-Spam-Score: 1.0 (+) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-Headers-End: 1WxRRa-0001Ll-4x X-BeenThere: cedet-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Development discussions for CEDET projects List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cedet-devel-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.emacs.cedet:6867 gmane.emacs.devel:172526 Archived-At: > to better comment. There is an expense expanding from some symbol p (which > could be port) past the ->, and to the next symbol. If there happen to be > 10 possible "p" expansions that are all also some sort of struct, then p->f, > the f could be a rather large number of possible things, and thus be > expensive if not handled carefully. Indeed. > For example if the code had 4 variables "port1" "port2", etc that were > all the same type. When expanding the ->f, that should happen once > instead of 4 times because we know all the types are the same. A bit of caching should go a long way, but in any case, as you mention: we'll cross that bridge when we get there. > reference. "d" is generally derived the same as f and a, but we apply one > last filter of the return type, so if you had: > q = p->f->a->d; > Then d's type should be similar to q. That's odd. Does that mean that the user might have been unable to use completion on the "p->f->a" part (before typing "->d") because the "a" field was not of a similar type as q? Or do you first use this "type similar to context" filter an if the filter doesn't let anything through, then you drop the filter (kind of like we filter out files that match completion-ignored-extensions, except when that results in "no match")? > I hope that helps, though I'm pretty sure it won't impact your current > experiment much since these are all thoughts of optional optimizations. Indeed. Stefan ------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems