From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [bug, patch, ox] INCLUDE and footnotes Date: Wed, 10 Dec 2014 16:44:24 +0100 Message-ID: <878uifbjc7.fsf@nicolasgoaziou.fr> References: <87h9x5hwso.fsf@gmx.us> <87oarcbppe.fsf@nicolasgoaziou.fr> <87fvcozfhf.fsf@gmx.us> <87h9x4bj33.fsf@nicolasgoaziou.fr> <87iohks4ne.fsf@gmx.us> <87d27rbvio.fsf@nicolasgoaziou.fr> <87bnnbhg2x.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyjQS-0002nA-Mq for emacs-orgmode@gnu.org; Wed, 10 Dec 2014 10:43:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XyjQK-000439-Fr for emacs-orgmode@gnu.org; Wed, 10 Dec 2014 10:43:40 -0500 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:36583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyjQK-00042v-9m for emacs-orgmode@gnu.org; Wed, 10 Dec 2014 10:43:32 -0500 In-Reply-To: <87bnnbhg2x.fsf@gmx.us> (rasmus@gmx.us's message of "Wed, 10 Dec 2014 12:58:14 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rasmus Cc: emacs-orgmode@gnu.org Rasmus writes: > I'm curious about the hash table. (info "(elisp) Hash Tables") says "For > smaller tables (a few tens of elements) alists may still be faster [than > hash tables]". True, but then, both a small table and a small alist are very fast. OTOH, hash tables scale better. > For an Org document, might it not make more sense to use an alist for > this? It doesn't matter much. I'd still favor a hash-table since it's hard to predict an upper bound for include keywords in a document, but it's your call, really. I doubt the alist or hash table will be the bottleneck. > Or will the speed be regained when doing many includes from the > same document (since I'd check if a footnote is already in the table)? You would need to access the alist/hash table for each include keyword, not necessarily from the same document. > Also, since INCLUDE is expanded before info, should I just create a new > defvar holding the table during export? I guess that's the only way to > hold it in memory across several INCLUDE words. It should be in the scope of `org-export-expand-include-keyword', much like `file-prefix'. No need for a global variable. Regards,