spaceline-all-the-icons.el
spaceline-all-the-icons.el copied to clipboard
Performance issues on Windows
Hi,
When activating spaceline-all-the-icons on Windows (10) I get really slow performance. Just moving the cursor in the scratch buffer is slow.
No such problems on my Linux machine.
I'm using Emacs 25.1 in both cases.
Any idea what could cause this?
@joncol try to debug that issue with profiler
Probably that answer can help you http://stackoverflow.com/a/25326326
@joncol I'm afraid I'm not sure, there's a similar issue raised here domtronn/all-the-icons.el#28...
Unfortunately, I don't have my windows machine at the moment so I won't be able to investigate this myself! But I'd be very interested in the profiling results :)
This profile was created by moving the cursor up and down many times in the scratch buffer.
(Can be opened with profiler-find-profile
.)
That's odd... It doesn't look like it's that intensive on the CPU, seeing as helm
seems to be using the majority of it. I'm not familiar with profiling so I don't know if this is truly indicative of your performance issue. 😞
My intuition would tell me it's the way Windows Emacs does redisplaying... But I wouldn't know where to begin with it! I'll let you know if I get time to look into this... But I'm going to put it on hold from my perspective, sorry.
I must admit, on MacOS Sierra, I also notice notable performance issues since I switched to spaceline-all-the-icons, especially when switching form a buffer to another of when creating a (built-in, not helm
) completion list.
Will investigate.
w.r.t. performance, unfortunately yeah there may be a bit of a performance hit with some of these segments... Since its evaluating a fair amount of lisp regularly, sometimes including IO operations! I don't know how often the mode line redraws - I know it definitely redraws when you switch buffer so that might be what you're seeing @jwintz.
The best I can advise is customising it to your liking until your happy with performance. I work on a MacOS El Capitan and whilst it's sometimes noticeable compared to a vanilla mode line, it is doing and displaying a lot more information. I guess its all a trade off :) But I'm more than happy to accept performance improvements for segments!
Hey @joncol
I've been making a lot of performance improvements to this package (mainly through introducing memoization in all-the-icons
). Unfortunately, I still don't have a access to a windows machine, but you could try again after updating the packages, see if that improves things 🙂
@domtronn: Cool, I'll try it out (probably tomorrow) and let you know the results.
@domtronn: I have to say that it's still very sluggish. The time from when I press a key to when something happens is something like 250 - 500 ms.
Boooooo, that's unfortunate 😞
I don't suppose you could get a profile report for me for memory? That might tell me what Windows is struggling to do
Attaching memory and cpu profile reports. The only thing I did during this profile was to move around the cursor. Hope it helps.
Try to add this to your init: (setq inhibit-compacting-font-caches t)
Same problem here on OSX 10.12.5 (16F73) and Emacs 25.2 with Spacemacs on latest develop branch.
@Kungsgeten I've tried it here on OSX but I still experience noticeable lags even with cursor movements.
I found the same thing - turns out is was a combination of diff-hl
and spaceline-all-the-icons
- I had diff-hl-flydiff-mode
enabled - once turning this off was much faster. Seems spaceline-all-the-icons
wants to be called on every redisplay - and so each time you move the cursor it recalculates spaceline-all-the-icons--git-statistics
- which would call into diff-hl
and would be slow due to diff-hl-flydiff-mode
.
For now I have disabled diff-hl-flydiff-mode
but it would be great to see if a lot of these details could instead be cached and not have to be recomputed on each redisplay - ie. only update diff info when a change is made and then cache it - same for other bits.
FYI - I pushed a change to projectile (https://github.com/bbatsov/projectile/commit/7951b17e6d4adef8fcb4e15ef6c466ef53b59ccf) to cache (projectile-project-root)
which helps with some performance issues - I noticed this myself with spaceline-all-the-icons
but I see I am not the only one - https://github.com/domtronn/spaceline-all-the-icons.el/issues/9#issuecomment-302646833 shows a lot of hits for (projectile-project-root)
as well - so try using the latest git version of projectile and see if this helps you too.
I am experiencing the same issue on both macOS 10.12 and Windows 7, with GNU Emacs 25.2. spaceline-all-icons is very pretty but extremely laggy, no matter whether enabling diff-hl-flydiff-mode
or not. CPU and Mem consumption is very high. I attach the profiler reports for reference.
FWIW, for me, that projectile-project-root
-caching commit fixed consistent, significant slowdowns I was seeing on OS X (when, for example, moving point forward and backward by words) in all files within a particular non-project subdir (perhaps just due to how deeply nested the subdir was, didn't look into it further) -- thanks @alexmurray
@braham-snyder - you're welcome - glad it was helpful to you.
suggestion by @Kungsgeten fixed the performance issue for me. I was having trouble just navigating the buffer on windows 10
flydiff is still an issue on mac for me - https://github.com/domtronn/spaceline-all-the-icons.el/issues/9#issuecomment-315944262