domtronn / spaceline-all-the-icons.el

A Spaceline Mode Line theme using All The Icons for Emacs
MIT License
235 stars 25 forks source link

`count-words` in `all-the-icons-region-info` is slow #67

Closed jonathanj closed 6 years ago

jonathanj commented 6 years ago

According to the profiler, the use of count-words in spaceline-all-the-icons is slow. The only place I could find this being used was the region info and unfortunately there's no way to turn it off. I'm quite happy to trade off word count in a region for speed.

image

For reasons I don't understand, this is significantly worse (bordering on unusable) when selecting a region of Python imports.

Would you be willing to make this feature customizable?

domtronn commented 6 years ago

You can disable the entire segment if you don't want to use it with

(spaceline-toggle-all-the-icons-region-info-off)

But if you'd still like something to indicate that the region is active, let me know and I'll update this :)

jonathanj commented 6 years ago

Thanks, @domtronn, I didn't see that command. For my needs it's perfectly fine to turn off the region info altogether.