auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cleaning up temporal markers


From: Arash Esbati
Subject: Re: Cleaning up temporal markers
Date: Fri, 09 Jul 2021 10:05:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50

David Kastrup <dak@gnu.org> writes:

> The Elisp manual says this:
>
>        Insertion and deletion in a buffer must check all the markers and
>     relocate them if necessary.  This slows processing in a buffer with
>     a large number of markers.  For this reason, it is a good idea to
>     make a marker point nowhere if you are sure you don’t need it any
>     more.  Markers that can no longer be accessed are eventually removed
>     (*note Garbage Collection::).
>
> Note that markers that can no longer be accessed (which would apply to
> let-bound markers) are _eventually_ removed in garbage collection.
> Until they are removed, the performance implications when they are
> associated with a buffer remain.
>
> In theory, the Elisp compiler might realise that a let-bound marker has
> become inaccessible and might detach it on its own.  But relying on that
> would seem imprudent, and it would be probably a bit daring for an
> optimisation.
> [...]
>
> As I read the Elisp reference, it is pretty clear.  What other
> interpretation do you read into the text?

Thanks for the explanation.  I read the text from Elisp reference in the
same way.  I meant that the text is not clear in terms of "what should
we do".  The text is technically correct, but practically, it could say
"do yourself and your users a favor and clean up let-bound markers as
well and don't wait for GC to kick in".  This might explain why the code
in AUCTeX doesn't clean up and the patch suggested by Keita is good.

Sorry for not being precise in my first message.

Best, Arash






reply via email to

[Prev in Thread] Current Thread [Next in Thread]