[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Eric Cooper <ecc@c...> |
| Subject: | Re: [Caml-list] A small footprint GUI for OCaml |
On Sat, May 26, 2007 at 03:09:43PM -0700, Alexsandro Soares wrote: > My collaborators and I wrote a small footprint graphics.cmxa based > GUI for OCaml. It works well on Windows, but not so well on > Linux. In fact, in most Linux installations the program turns out to > be unbearably slow; to make it usable, I am forced to use powerful > and well tuned video cards. I tried your program briefly and noticed (using a load monitor) that it was constantly using CPU cycles even when it should be idle. So I ran it under "strace" and saw that it was continually reading data from the connection to the X server. This occurs inside a signal action, probably triggered by a timer interrupt. Compare that to a real Emacs process, which is almost always in a blocking select() system call when idle. I haven't looked at your source code, or the Graphics implementation, but I conclude that you need to find a way to block, rather than poll, for input events. -- Eric Cooper e c c @ c m u . e d u