mattfidler / tabbar-ruler.el

Tabbar Ruler Mode
54 stars 10 forks source link

Tabbar Ruler has impact in performance #10

Closed ghost closed 9 years ago

ghost commented 10 years ago

when activated tabbar-ruler consumes 10% CPU constantly and when I turn back to its normal 0.3%

mattfidler commented 10 years ago

What are the options you are using?

ghost commented 10 years ago

This:

(require 'tabbar-ruler)
  (setq tabbar-ruler-global-tabbar t) 

(global-set-key (kbd "C-c C-t") 'tabbar-ruler-move)
ccordoba12 commented 9 years ago

I love tabbar-ruler but I'm seeing a much higher impact on CPU: The X server consumes about 30% of CPU and Emacs another 15% when tabbar-ruler is on.

I confirmed tabbar-ruler is the culprit by disabling everything but it in my .emacs. Do you know what could be the cause? By the way, this doesn't happen just with tabbbar or emacs -nw

mattfidler commented 9 years ago

Its because you have a hack that is constantly frying to check the mouse position by a timer. This allows the tabbar and the menu to be displayed. If you can figure out another way to track the mouse position, I would be happy to accept a patch. As such, if you don't want the impact on performance, just remove the auto-hiding or changing between ruler and tabbar.

ccordoba12 commented 9 years ago

How can I do that? I mean, what option should I add to my .emacs? By the way, thanks for following up this one :-)

mattfidler commented 9 years ago

I downed the timer delay and made it customizable.

You could disable the mouse-movement commands with something like

(setq tabbar-ruler-movement-timer-dealy 1000000)
ccordoba12 commented 9 years ago

Sorry for the huge delay in coming back to you @mlf176f2, but I wasn't using Emacs during these months ;-)

I can confirm that your suggested line in .emacs works for me. But without it, my CPU usage is even higher for the latest tabbar-ruler: something like 60% for the X server and 30% for Emacs.

Thanks a lot for the update!! Now I can use Emacs again ;-)