domtronn / all-the-icons.el

A utility package to collect various Icon Fonts and propertize them within Emacs.
MIT License
1.48k stars 177 forks source link

Dart icon causes 100% CPU usage #202

Closed zoechi closed 4 years ago

zoechi commented 4 years ago

The changes from #200 caused severe performance issues.

As soon as I expand a directory that contains Dart files (treemacs, dired) or scroll in a buffer of a Dart file (with doom-modeline-icon t) CPU spikes at 100% for about 15-30 seconds

See https://github.com/Alexander-Miller/treemacs/issues/649 for more details.

I commented the changes of #200 out in emacs.d/elpa/all-the-icons-xxxx and the issue was fixed.

Any idea what could cause that?

wyuenho commented 4 years ago

That's weird. How's the performance with a vanilla emacs and just all-the-icons installed?

zoechi commented 4 years ago

with emacs -q and only all-the-icons all is perfectly fine. As soon as I also load

(use-package doom-modeline
  :ensure t
  :init (doom-modeline-mode 1)
  :custom((doom-modeline-icon t))
  )

scrolling in *.dart files causes 100% CPU utilization.

zoechi commented 4 years ago

The modeline does not even show the Dart icon

emacs_dart_icon_snapshot

When I load and open Treemacs it shows the Dart icon

emacs_dart_icon_snapshot2

When I then load (doom-themes-treemacs-config) Treemacs does not show the Dart icon anymore.

emacs_dart_icon_snapshot3

but now I also do not experience the 100% CPU utilization issue when I expand a directory containing Dart files in Treemacs, but still when scrolling with doom-modeline active.

Could this be some icon cache not being updated after the all-the-icons update?

wyuenho commented 4 years ago

I don't know man. This sounds like some weird interactions in your packages.

zoechi commented 4 years ago

I understand. I hoped this might have come up already because it's probably not the first time a new icon was added. I guess I'll try to report in the doom-modeline repo instead. Thanks a lot for your support!

Alexander-Miller commented 4 years ago

When I load and open Treemacs it shows the Dart icon

FYI treemacs does not use any iconic fonts like all-the-icons, it has its own set of png files.

zoechi commented 4 years ago

FYI treemacs does not use any iconic fonts like all-the-icons, it has its own set of png files.

(doom-themes-treemacs-config) changes icons, perhaps that's why it only reproduced with it or the doom-modeline caused this even when not shown in the treemacs buffer and no other buffer open.

zoechi commented 4 years ago

I can't reproduce anymore. There were updates the recent days (lsp-mode, treemacs, others) Perhaps one of those fixed it.

update The CPU usage issue when expanding in treemacs is fixed The CPU usage with Doom-modeline can still be observed, but only for a about ~5 seconds and then CPU usage goes back to normal.