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

Slowness when using tramp #110

Open nevetS opened 4 years ago

nevetS commented 4 years ago

I have been experiencing slowness when using tramp to edit files with this theme.

  1. turn off the projectile-mode segment
  2. turn off the buffer-id segment

I haven't gone through the trouble of cleaning up my environment to make a cleanly reproducable test, but the performance hit was enough that emacs/tramp became unusable even with just a sudo'ed connection.

tramp debugging showed that there were all kinds of file operations happening, and shutting down just projectile-mode wasn't enough.

I did see #34 about this same issue, but my versions are newer than the ones mentioned in the solution. (I am using spaceline-all-the-icons 20190325.1602, all-the-icons 20190320.1809 and spaceline 20181223.2024 currently)

I think the proper solution is to set the :when property for these segments so that they are disabled when remote-file-p returns true.

Is remote-file-p memoized? And if so, how do I set the when property in my init.el? If not, is there another recommended path for fixing this problem at least in my environment?