From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Ben Wing" Newsgroups: gmane.emacs.devel Subject: Re: Profiling font-lock in xemacs Date: Thu, 27 Jun 2002 14:55:23 -0700 Sender: emacs-devel-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: main.gmane.org 1025215061 9191 127.0.0.1 (27 Jun 2002 21:57:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 27 Jun 2002 21:57:41 +0000 (UTC) Cc: ben@666.com, bws@deepcopy.org, xemacs-design@xemacs.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17NhGn-0002O8-00 for ; Thu, 27 Jun 2002 23:57:41 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17NhJZ-0002uM-00 for ; Fri, 28 Jun 2002 00:00:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17NhGi-0005qA-00; Thu, 27 Jun 2002 17:57:36 -0400 Original-Received: from f102.law12.hotmail.com ([64.4.19.102] helo=hotmail.com) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17NhEa-0005ih-00; Thu, 27 Jun 2002 17:55:25 -0400 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 27 Jun 2002 14:55:23 -0700 Original-Received: from 80.17.151.58 by lw12fd.law12.hotmail.msn.com with HTTP; Thu, 27 Jun 2002 21:55:23 GMT X-Originating-IP: [80.17.151.58] Original-To: monnier+gnu/emacs@rum.cs.yale.edu, rms@gnu.org X-OriginalArrivalTime: 27 Jun 2002 21:55:23.0907 (UTC) FILETIME=[56D2BD30:01C21E25] Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:5241 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:5241 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. ben >From: "Stefan Monnier" >To: Richard Stallman >CC: monnier+gnu/emacs@rum.cs.yale.edu, ben_wing@hotmail.com, ben@666.com, >bws@deepcopy.org, xemacs-design@xemacs.org, emacs-devel@gnu.org >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 >possibility. > > > Stefan > _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx