From: Eric Cooper <ecc@cmu.edu>
To: caml-list@yquem.inria.fr, lista OCaml <caml-list@inria.fr>
Subject: Re: [Caml-list] A small footprint GUI for OCaml
Date: Sun, 27 May 2007 10:52:43 -0400 [thread overview]
Message-ID: <20070527145243.GB25025@stratocaster.home> (raw)
In-Reply-To: <20070526220943.45293.qmail@web51612.mail.re2.yahoo.com>
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
prev parent reply other threads:[~2007-05-27 14:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-26 22:09 Alexsandro Soares
2007-05-27 14:52 ` Eric Cooper [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070527145243.GB25025@stratocaster.home \
--to=ecc@cmu.edu \
--cc=caml-list@inria.fr \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox