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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 6C8ECBB83 for ; Tue, 4 Jul 2006 21:12:22 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k64JCNX0008345 for ; Tue, 4 Jul 2006 21:12:23 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA16992 for ; Tue, 4 Jul 2006 21:12:22 +0200 (MET DST) Received: from chokecherry.srv.cs.cmu.edu (CHOKECHERRY.SRV.CS.CMU.EDU [128.2.185.41]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k64JCLwU008338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 4 Jul 2006 21:12:22 +0200 Received: from stratocaster.home (c-24-3-154-200.hsd1.pa.comcast.net [24.3.154.200]) (authenticated bits=0) by chokecherry.srv.cs.cmu.edu (8.13.6/8.13.6) with ESMTP id k64JCGXa014336 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 4 Jul 2006 15:12:17 -0400 (EDT) Received: from ecc by stratocaster.home with local (Exim 4.62) (envelope-from ) id 1FxqJk-00048d-KB for caml-list@inria.fr; Tue, 04 Jul 2006 15:12:16 -0400 Date: Tue, 4 Jul 2006 15:12:16 -0400 To: caml-list@inria.fr Subject: Re: [Caml-list] LablGTK app maxes out CPU Message-ID: <20060704191216.GA15888@localhost> Mail-Followup-To: caml-list@inria.fr References: <44AAB3B3.6000807@gushee.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44AAB3B3.6000807@gushee.net> User-Agent: Mutt/1.5.11+cvs20060403 From: Eric Cooper X-Miltered: at nez-perce with ID 44AABD97.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 44AABD95.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; lablgtk:01 unix:01 nonblock:01 2006:98 wrote:01 caml-list:01 btw:02 graphical:02 gui:04 gui:04 negligible:04 nonblocking:04 jul:04 long:05 channel:05 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 On Tue, Jul 04, 2006 at 12:30:11PM -0600, Matt Gushee wrote: > [...] > 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, and it continues to do so as long as it runs, whether the GUI is > displayed or not. So I wonder if there's something more I need to do to > keep the app well-behaved (BTW, it should never require much CPU time. > It's a lightweight file manager, and is graphical only in the sense that > it is a GUI app--it uses no icons or other images). Try making the fd nonblocking before you create the glib channel: Unix.set_nonblock msg_fd; -- Eric Cooper e c c @ c m u . e d u