From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Easy traversal of customize groups Date: Fri, 23 Jun 2017 20:06:34 -0400 Message-ID: References: <87mv8yipav.fsf@x230.lts> <878tkiia92.fsf@x230.lts> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1498262819 9531 195.159.176.226 (24 Jun 2017 00:06:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 24 Jun 2017 00:06:59 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Etienne =?utf-8?Q?Prud=E2=80=99homme?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 24 02:06:53 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOYbA-0001pS-GE for ged-emacs-devel@m.gmane.org; Sat, 24 Jun 2017 02:06:48 +0200 Original-Received: from localhost ([::1]:37689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOYbC-0000JV-Cy for ged-emacs-devel@m.gmane.org; Fri, 23 Jun 2017 20:06:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOYb6-0000JO-Nj for emacs-devel@gnu.org; Fri, 23 Jun 2017 20:06:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOYb3-0003rs-JA for emacs-devel@gnu.org; Fri, 23 Jun 2017 20:06:44 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:16930) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dOYb3-0003po-BZ for emacs-devel@gnu.org; Fri, 23 Jun 2017 20:06:41 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CfDgA4rE1Z/48Dr7heHAEBBAEBCgEBg1hChRmFDIYAkG4QGwGXXYYeBAICgwdEFAECAQEBAQEBAWsohRkBBAEjMyMFCwsaAhgOAgIUGA0kLooJCK5FgiaLWwELJoELghyIUYRqgxOCYQEEnmOVVBiJA4cDiSWKLYFENiGBCjAhCDCFVR2CAiSKSwEBAQ X-IPAS-Result: A0CfDgA4rE1Z/48Dr7heHAEBBAEBCgEBg1hChRmFDIYAkG4QGwGXXYYeBAICgwdEFAECAQEBAQEBAWsohRkBBAEjMyMFCwsaAhgOAgIUGA0kLooJCK5FgiaLWwELJoELghyIUYRqgxOCYQEEnmOVVBiJA4cDiSWKLYFENiGBCjAhCDCFVR2CAiSKSwEBAQ X-IronPort-AV: E=Sophos;i="5.39,381,1493697600"; d="scan'208";a="318273119" Original-Received: from 184-175-3-143.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([184.175.3.143]) by smtp.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 23 Jun 2017 20:06:38 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 9EA7AAE4DB; Fri, 23 Jun 2017 20:06:34 -0400 (EDT) In-Reply-To: <878tkiia92.fsf@x230.lts> ("Etienne =?utf-8?Q?Prud=E2=80=99ho?= =?utf-8?Q?mme=22's?= message of "Fri, 23 Jun 2017 18:56:25 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:215923 Archived-At: >> Another option is to perform one mapatoms traversal which builds a cache >> of the "reverse links" and then use that. > That=E2=80=99s also a solution. Were you talking about a tree structure? I was thinking of keeping the "tree" in a hash-table. > It think it might over complicate the current implementation since we > would have to remove an entry from the cache when it is unloaded and we > would have to update each possible paths when a new group is loaded. I was thinking of throwing the hash-table as soon as you're done with it. It's pretty cheap to build. You only need it to avoid O(N) calls to mapato= ms. Stefan