unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#35675: 27.0.50; Is line-number-at-pos unnecessarily slow?
@ 2019-05-10 20:55 Alex Branham
  2019-05-11  6:03 ` Eli Zaretskii
  2019-05-11 20:36 ` Basil L. Contovounesios
  0 siblings, 2 replies; 4+ messages in thread
From: Alex Branham @ 2019-05-10 20:55 UTC (permalink / raw)
  To: 35675

Hi all -

I ran into a bottleneck at line-number-at-pos in ESS's indentation
engine. line-number-at-pos basically regex searches forward for \n's and
counts them up. This can be slow in a large buffer. It looks like
someone else has ran into this issue as well.[1]

With the advent of display-line-numbers-mode, I imagine there's a C
implementation of line-number-at-pos. I imagine the C implementation is
faster. Does it make sense for line-number-at-pos to just use the C
implementation?

Thanks,
Alex

Footnotes:
[1]  https://fuco1.github.io/2018-08-12-WAR-STORY:-When-turning-to-the-profiler-turns-out-to-be-a-good-call.html





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-14 12:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-10 20:55 bug#35675: 27.0.50; Is line-number-at-pos unnecessarily slow? Alex Branham
2019-05-11  6:03 ` Eli Zaretskii
2019-05-11 20:36 ` Basil L. Contovounesios
2019-05-14 12:34   ` Alex Branham

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).