[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Profiling font-lock in xemacs

From: Ben Wing
Subject: Re: Profiling font-lock in xemacs
Date: Thu, 27 Jun 2002 14:55:23 -0700

what we do is something like this:

--all the signal handler does is set a flag. (this flag also gets set by a 0.25-second asynchronous timer, on systems like MS Windows that have no SIGIO.)

--QUIT notices this, which causes it (on most platforms) to drain the input queue, storing it into an internal "dispatch queue". we iterate through this to look for C-g. (under X we actually use something like XCheckIfInput (i forget the proper name) instead of draining the queue, but that's bogus and left over from a long time ago and should be fixed like the other platforms.) the dispatch queue is one of the sources of next-event (your read-event).

i don't think sigchld should do *anything* except set a flag.


From: "Stefan Monnier" <monnier+gnu/address@hidden>
To: Richard Stallman <address@hidden>
CC: monnier+gnu/address@hidden, address@hidden, address@hidden, address@hidden, address@hidden, address@hidden
Subject: Re: Profiling font-lock in xemacs
Date: Sun, 23 Jun 2002 14:40:36 -0400

> Emacs does not do very much in signal handlers now.  For sigchld it
> just records the status, something that is best done right away.
> XTread_socket is complex; if some of that can be done later on, that
> might be good.  But it can't wait too long.  For instance, quit has to
> be detected reasonably soon.  Perhaps the QUIT macro could run the
> code to process the input.
> On the other hand, this code works; we have had little problem with
> it for a long time.

The problem is indeed XTread_socket.  It is complex and it has
introduced really nasty bugs which were very difficult to trace.
Also, it is dangerous to try to extend its functionality because
it is run asynchronously (the recent "selected-window follows mouse"
patch is a case in point).

I think it would be worth it to try and move the bulk of it out of the
signal handler as the XEmacs folks did.  I haven't checked when the do
the "check for input".  Doing it from QUIT is indeed one obvious


MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx

reply via email to

[Prev in Thread] Current Thread [Next in Thread]