all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs using too much CPU
@ 2004-05-17 16:00 snmishra
  2004-05-17 19:26 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: snmishra @ 2004-05-17 16:00 UTC (permalink / raw)


Hi All

I have this pesky little problem with emacs: it is always running at
around 55% CPU utilization. I have been trying to figure out what is
causing it without any avail. 

I tried truss on it. Seems to be trying to open a ".#vm-inbox" file in
my mail directory. vm-inbox is the primary inbox for VM mail reader
and also writes a lot to the X11-pipe (my guess).

I know this is not enough information for a solution. But maybe
someone has some idea on how to find out which program within emacs is
using the CPU so much.

I would appreciate any help.

Thanks 
Satya

------------------
Truss Output
------------------
lstat64("/home/satya/mail/.#vm-inbox", 0xFFBED260) Err#2 ENOENT
readlink("/home/satya/mail/.#vm-inbox", 0x006D6280, 100) Err#2 ENOENT
ioctl(5, FIONREAD, 0xFFBBFFF4)                  = 0
ioctl(5, FIONREAD, 0xFFBC0054)                  = 0
write(5, " =\0\00406 @\01D\001\001".., 32)      = 32
ioctl(5, FIONREAD, 0xFFBBF9E4)                  = 0
ioctl(5, FIONREAD, 0xFFBBF9E4)                  = 0
sigaction(SIGALRM, 0xFFBED0F8, 0xFFBED178)      = 0
setitimer(ITIMER_REAL, 0xFFBED208, 0x00000000)  = 0
ioctl(5, FIONREAD, 0xFFBBFF3C)                  = 0
poll(0xFFBED660, 3, 125)                        = 0
ioctl(5, FIONREAD, 0xFFBBFF3C)                  = 0
ioctl(5, FIONREAD, 0xFFBC0054)                  = 0
getloadavg(0xFFBED7B4, 3)                       = 3
ioctl(5, FIONREAD, 0xFFBC00D4)                  = 0
    Received signal #14, SIGALRM [caught]
ioctl(5, FIONREAD, 0xFFBBF11C)                  = 0
setitimer(ITIMER_REAL, 0xFFBEC788, 0x00000000)  = 0
setcontext(0xFFBEC8F0)
------------


-- 
Remove XXX and YYY to get my address

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Emacs using too much CPU
  2004-05-17 16:00 Emacs using too much CPU snmishra
@ 2004-05-17 19:26 ` Stefan Monnier
  2004-05-17 22:19   ` snmishra
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2004-05-17 19:26 UTC (permalink / raw)


> I have this pesky little problem with emacs: it is always running at
> around 55% CPU utilization. I have been trying to figure out what is
> causing it without any avail. 

Try (setq jit-lock-stealth-time nil)
It's probably fontifying all your INBOX messages in the background.


        Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Emacs using too much CPU
  2004-05-17 19:26 ` Stefan Monnier
@ 2004-05-17 22:19   ` snmishra
  2004-05-18 17:43     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: snmishra @ 2004-05-17 22:19 UTC (permalink / raw)


>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca> writes:

    >> I have this pesky little problem with emacs: it is always
    >> running at around 55% CPU utilization. I have been trying to
    >> figure out what is causing it without any avail.

    Stefan> Try (setq jit-lock-stealth-time nil) It's probably
    Stefan> fontifying all your INBOX messages in the background.

Stefan

Thanks for the help. That seems to have fixed the problem mostly. 

I found that the auto-save-timeout was at 30 seconds. So CPU usage was
going up every 30 seconds. Hopefully that takes care of most problems.

Satya

-- 
Remove XXX and YYY to get my address

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Emacs using too much CPU
  2004-05-17 22:19   ` snmishra
@ 2004-05-18 17:43     ` Stefan Monnier
  2004-05-18 18:09       ` Satya Mishra
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2004-05-18 17:43 UTC (permalink / raw)


> I found that the auto-save-timeout was at 30 seconds. So CPU usage was
> going up every 30 seconds. Hopefully that takes care of most problems.

auto-save shouldn't use much CPU if any (it's run rarely for one, and even
when it's run it should be quick, and even if it takes a non-negligible
amount of time (say for a very large buffer, most of that time is spent
waiting for the disk rather than using the CPU).


        Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Emacs using too much CPU
  2004-05-18 17:43     ` Stefan Monnier
@ 2004-05-18 18:09       ` Satya Mishra
  0 siblings, 0 replies; 5+ messages in thread
From: Satya Mishra @ 2004-05-18 18:09 UTC (permalink / raw)


>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca> writes:

    >> I found that the auto-save-timeout was at 30 seconds. So CPU
    >> usage was going up every 30 seconds. Hopefully that takes care
    >> of most problems.

    Stefan> auto-save shouldn't use much CPU if any (it's run rarely
    Stefan> for one, and even when it's run it should be quick, and
    Stefan> even if it takes a non-negligible amount of time (say for
    Stefan> a very large buffer, most of that time is spent waiting
    Stefan> for the disk rather than using the CPU).

 I think auto-save itself doesn't take that much time. But auto-save
also triggers gc, from the documentation of auto-save-timeout. I am
guessing that takes some CPU. Again my understanding is really very
limited. But these changes seem to have helped getting emacs to be
more responsive.

Satya

-- 
Remove XXX and YYY to get my address

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-05-18 18:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-17 16:00 Emacs using too much CPU snmishra
2004-05-17 19:26 ` Stefan Monnier
2004-05-17 22:19   ` snmishra
2004-05-18 17:43     ` Stefan Monnier
2004-05-18 18:09       ` Satya Mishra

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.