bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#35675: 27.0.50; Is line-number-at-pos unnecessarily slow?


From: Alex Branham
Subject: bug#35675: 27.0.50; Is line-number-at-pos unnecessarily slow?
Date: Fri, 10 May 2019 15:55:09 -0500
User-agent: mu4e 1.2.0; emacs 27.0.50

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





reply via email to

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