From: Eli Zaretskii <eliz@gnu.org>
To: Ihor Radchenko <yantar92@posteo.net>,
Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 63040@debbugs.gnu.org
Subject: bug#63040: 30.0.50; Performance of buf_bytepos_to_charpos when a buffer has large number of markers
Date: Mon, 24 Apr 2023 14:03:17 +0300 [thread overview]
Message-ID: <83r0s9y22y.fsf@gnu.org> (raw)
In-Reply-To: <87bkjdzt0o.fsf@localhost> (message from Ihor Radchenko on Mon, 24 Apr 2023 06:36:07 +0000)
[Resending with Stefan added.]
> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: 63040@debbugs.gnu.org
> Date: Mon, 24 Apr 2023 06:36:07 +0000
>
> > Interesting. Would it be possible to show the effect of different
> > values of the cut-off on the performance, so we could decide which
> > value to use?
>
> I can do such test, but I do not think that playing with cut off is the
> best approach here.
>
> The full code in question is below and there is already existing
> condition to cut the marker loop early based on the distance from
> best_above to the requested bytepos. So, another approach could be
> playing with BYTECHAR_DISTANCE_INCREMENT.
Yes, that would be an even better idea, IMO.
> Now, it is clearly not efficient enough for my large file.
Why do you say that? Did you try something and the results were
unsatisfactory? And what is not efficient enough -- the cutoff based
on the number of markers tested or based on the distance?
> Further, the later code creates markers to cache recent results and
> cutting too early may waste this cache.
And the technique that you tried doesn't waste the cache?
> Another idea could be moving the cache markers into a separate
> array, so that we can examine them without mixing with all other
> buffer markers.
Why would that separation be useful?
Thanks.
next prev parent reply other threads:[~2023-04-24 11:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-23 19:41 bug#63040: 30.0.50; Performance of buf_bytepos_to_charpos when a buffer has large number of markers Ihor Radchenko
2023-04-24 2:24 ` Eli Zaretskii
2023-04-24 6:36 ` Ihor Radchenko
2023-04-24 11:02 ` Eli Zaretskii
2023-04-24 11:03 ` Eli Zaretskii [this message]
2023-04-24 11:17 ` Ihor Radchenko
2024-06-25 21:04 ` Stefan Monnier
2024-06-26 12:47 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83r0s9y22y.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=63040@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=yantar92@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.