punassuming / ranger.el

Bringing the goodness of ranger to dired!
699 stars 52 forks source link

Bad performance #182

Open fth86 opened 6 years ago

fth86 commented 6 years ago

Hi,

I really like the look and feel of ranger, but performance is a big issue for me and does prevent me from using it in my day-to-day.

Opening a new directory via l or enter, leads to 100% CPU utilization, and a ~3 second complete freeze of emacs . Merely moving the cursor in a ranger buffer gets my CPU up to 40%, and the delay between keypress and cursor move is noticeably bigger compared to what is like in, say dired-mode, let alone a normal buffer.

The freeze is the biggest issue. The cpu utilization worries me. Both is independent from the visibility of the toggleable preview buffer.

Am I the only one experiencing this? I built newest emacs from source using the master branch as of 28.04.2018, and use spacemacs.

alphapapa commented 6 years ago

You may be able to gain some insight by running pkill -SIGUSR2 emacs while the CPU is at 100%. That will interrupt Emacs and print a backtrace showing what it was doing at that moment. (This is generally safe, but you might want to do it in a dedicated Emacs process so as to not interrupt other work (in which case you should use kill and the specific PID instead of pkill).)