X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_NO,SPF_NEUTRAL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4FD8DE9C.1090900@cornell.edu> Date: Wed, 13 Jun 2012 14:40:28 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Performance problems with emacs-X11 in current cygwin References: <4FC7D9E6 DOT 5050609 AT alice DOT it> <4FCA1FF0 DOT 8090703 AT alice DOT it> <4FCA2CA9 DOT 7080704 AT cornell DOT edu> <4FCA634D DOT 1080206 AT cornell DOT edu> <4FCB2991 DOT 3010701 AT users DOT sourceforge DOT net> <4FCB5438 DOT 7080903 AT cornell DOT edu> <4FCB9872 DOT 5010506 AT cornell DOT edu> <4FD1F709 DOT 4050107 AT cornell DOT edu> <87k3zhbyyk DOT fsf AT Rainer DOT invalid> <4FD22C39 DOT 6070107 AT cornell DOT edu> <4FD53FA9 DOT 2040105 AT cornell DOT edu> In-Reply-To: <4FD53FA9.2040105@cornell.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-CORNELL-SPAM-CHECKED: Pawpaw X-Original-Sender: kbrown AT cornell DOT edu - Wed Jun 13 14:40:28 2012 X-PMX-CORNELL-REASON: CU_White_List_Override X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 6/10/2012 8:45 PM, Ken Brown wrote: > The bisection shows that the first problematic commit is this one: > > http://git.gnome.org/browse/glib/commit/?h=glib-2-32&id=7eae486179e2799c369ed9ffcea663bf9161ce79 > > > Author: Ryan Lortie > Date: Wed Aug 31 22:07:02 2011 -0400 > > GMain: simplify logic for g_wakeup_acknowledge() > > Instead of messing around with context->poll_waiting, just look at the > GPollFD to see if the GWakeup needs to be acknowledged. I think this commit contains a typo: "events" should be "revents". (context->wake_up_rec.events is always nonzero at this point in the code, so it makes no sense to test that.) As a result, g_wakeup_acknowledge() is being called much more often than necessary. I think this could easily explain the performance problems that have been reported, but I won't have a chance to test this on my (slow) XP system for a while, and possibly not until tomorrow. Ken -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple