From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 6EC96BB83 for ; Tue, 4 Jul 2006 20:59:29 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k64IxUkO013346 for ; Tue, 4 Jul 2006 20:59:30 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA16712 for ; Tue, 4 Jul 2006 20:59:29 +0200 (MET DST) Received: from mz3.forethought.net (mzpi5.forethought.net [216.241.36.14]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k64IxR9Y013332 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 4 Jul 2006 20:59:29 +0200 Received: from [216.241.35.41] (helo=[10.0.0.2]) by mz3.forethought.net with esmtp (Exim 4.51) id 1Fxq7F-0007n3-Lv for caml-list@inria.fr; Tue, 04 Jul 2006 12:59:23 -0600 Message-ID: <44AABAAB.6030408@gushee.net> Date: Tue, 04 Jul 2006 12:59:55 -0600 From: Matt Gushee User-Agent: Thunderbird 1.5.0.4 (X11/20060615) MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] LablGTK app maxes out CPU References: <44AAB3B3.6000807@gushee.net> In-Reply-To: <44AAB3B3.6000807@gushee.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 44AABA92.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 44AABA8F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; lablgtk:01 gmain:01 gmain:01 wrote:01 caml-list:01 argument:01 gui:04 gui:04 negligible:04 daemon:07 apparently:07 function:08 file:08 optional:09 setting:10 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Matt Gushee wrote: > GMain.Io.add_watch is used to cause the daemon to read the pipe (code > below). Now, I thought this would prevent the app from monopolizing > the CPU, but apparently it does not. When the app is started but > before the GUI is displayed for the first time, CPU usage is > negligible, but as soon as the GUI is displayed, the app starts using > all available CPU time, Oh, wait. I now remember that GMain.Io.add_watch has the optional ?prio argument. Would setting the watch function to a low priority help? If so, what would be a reasonable value? -- Matt Gushee : Bantam - lightweight file manager : matt.gushee.net/software/bantam/ : : RASCL's A Simple Configuration Language : matt.gushee.net/rascl/ :