ahungry / fast-scroll

Emacs package to ensure scrolling remains fast
GNU Affero General Public License v3.0
87 stars 5 forks source link

Suggestion #2

Closed alphapapa closed 5 years ago

alphapapa commented 5 years ago

Hi,

Thanks for sharing this package. Quick suggestion:

https://github.com/ahungry/fast-scroll/blob/1d4c9112b6ce62ef20897ebc40a97f09b97053c6/fast-scroll.el#L55

Working on ts.el, I found that format-time-string is surprisingly expensive. It might be faster to use current-time in this package.

If you decide to keep format-time-string, I'm guessing string-to-number would be faster than read.

ahungry commented 5 years ago

Thanks, I'll consider that.

ahungry commented 5 years ago

Updated to use string-to-number over read. If a bottleneck is on this polling function ever, I'll revisit the alternative current-time or encode-time builtins.

Thanks!