Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
LablGTK app maxes out CPU
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-07-04 (19:12)
From: Eric Cooper <ecc@c...>
Subject: Re: [Caml-list] LablGTK app maxes out CPU
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