0c13f5d6a39e69ccff7c887583c10c889a02ec82
accessibilityIndexForCharpos: walked composed character sequences from run.ax_start up to the target charpos offset. For a run covering an entire ASCII buffer, chars_in = pt - BUF_BEGV, making each call O(cursor_position). This method is called from ensureTextCache on EVERY redisplay frame (as part of the cache validity check), making each frame O(position) even when the buffer is completely unchanged. At line 34,000 of a large file this is ~1,000,000 iterations per frame. Fix: when ax_length == length for a run (all single-unit characters), the ax_index is simply ax_start + chars_in. O(1) instead of O(N). This is the symmetric counterpart to the charposForAccessibilityIndex: fast path added in the previous commit. Both conversion directions now run in O(1) for pure-ASCII buffers.
# instalace mailu: brew install mu isync msmtp pak mbsync personal (musi existovat .mbsyncrc) pak mu init --maildir=~/.mail --my-address=martin@sukany.cz mu index
Description
Languages
Emacs Lisp
95.3%
Shell
4.7%