emacs-devel
[Top][All Lists]
Advanced

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

Can we make set_point_both less expensive?


From: Daniel Colascione
Subject: Can we make set_point_both less expensive?
Date: Sun, 15 Mar 2015 12:53:48 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

Profiling some code I'd written recently, I found that goto-char was
using 90% of CPU time in a large buffer with lots of properties and
overlays. Setting inhibit-point-motion-hooks helped, but it occurs to me
that the operation shouldn't have been expensive in the first place.
Nothing in the buffer had a point motion hook or an intangible property,
though, so the work goto-char was doing was pointless.

In addition to allowing callers to bind inhibit-point-motion-hooks, what
about tracking whether any property or overlay ever inserted into a
buffer uses one of these uncommon facilities? This way, the common case
is fast even without inhibit-point-motion-hooks.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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