From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: 100% CPU on TCP servers (on Windoze). Date: Fri, 14 Jul 2006 10:51:50 +0100 Message-ID: <44B76936.4080803@gnu.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1152870811 17992 80.91.229.2 (14 Jul 2006 09:53:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Jul 2006 09:53:31 +0000 (UTC) Cc: Juanma Barranquero , Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 14 11:53:28 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G1KMG-0005ia-GD for ged-emacs-devel@m.gmane.org; Fri, 14 Jul 2006 11:53:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G1KMG-0000kA-3q for ged-emacs-devel@m.gmane.org; Fri, 14 Jul 2006 05:53:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G1KLF-0008Lz-3Z for emacs-devel@gnu.org; Fri, 14 Jul 2006 05:52:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G1KL9-0008G9-M4 for emacs-devel@gnu.org; Fri, 14 Jul 2006 05:52:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G1KL8-0008FH-T3 for emacs-devel@gnu.org; Fri, 14 Jul 2006 05:52:07 -0400 Original-Received: from [213.86.207.50] (helo=exchange.integrasp.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G1KN6-0003YK-4k for emacs-devel@gnu.org; Fri, 14 Jul 2006 05:54:08 -0400 Original-Received: from [192.168.111.61] (localhost [127.0.0.1]) by exchange.integrasp.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id NMA815HW; Fri, 14 Jul 2006 10:43:46 +0100 Original-Received: from 192.168.111.61 ([192.168.111.61] helo=[192.168.111.61]) by ASSP-nospam; 14 Jul 2006 10:43:46 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.4) Gecko/20060516 Thunderbird/1.5.0.4 Mnenhy/0.7.4.666 Original-To: "Kim F. Storm" In-Reply-To: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:56994 Archived-At: Kim F. Storm wrote: >>> (make-network-process :name "test" :server t :service t) >>> > I took a look at this issue, and it seems quite trivial to fix. > > Would someone try to apply the following patch and tell me whether > it makes a difference (pls. try the above example before and after > applying the patch). If it doesn't compile, pls try to fix it!! > Before your patch, the example works, but uses 50% CPU. I confirmed it worked by connecting to the socket and sending data to Emacs. After your patch, and some additional patching to dynamically load WSAEventSelect (the build process needs changing to eliminate this requirement), the example fails with the following stack trace: Debugger entered--Lisp error: (file-error "make server process failed" "invalid argument" :name "test" :server t :service t) make-network-process(:name "test" :server t :service t) eval((make-network-process :name "test" :server t :service t)) eval-last-sexp-1(t) eval-last-sexp(t) eval-print-last-sexp() call-interactively(eval-print-last-sexp)