Skip to content
Back to formatted view

Raw Message

Message-ID: <22D9AC1C-E829-11D7-8731-000A959F327E@math.uni-augsburg.de>
Date: 2003-09-16T15:58:13Z
From: Simon Urbanek
Subject: RAqua too hungry of cpu time
In-Reply-To: <32316A40-E81F-11D7-86DE-003065CC4CB8@mclink.it>

On Tuesday, September 16, 2003, at 10:24 AM, Stefano Iacus wrote:

> It seems that RAqua consumes too much cpu time when doing nothing.
> I can't see exactly why this is happening. We have few days to fix 
> this up. Any idea (after having look at the code) would be fine.

Well, it happens exactly what the code says ;). RAqua is spending all 
the time in those loops like this one:

    while(!InputFinished & !HaveBigBuffer)
         Raqua_ProcessEvents();

(This one comes from Raqua_ReadConsole)

Since in Raqua_ProcessEvents you simply call ReceiveNextEvent with 
kEventDurationNoWait, the function returns almost immediately and is 
called again ... so in effect you are hogging 100% CPU. I'd suggest 
using either some sensible timeout or kEventDurationForever.

Cheers,
Simon

---
Simon Urbanek
Department of computer oriented statistics and data analysis
Universit?tsstr. 14
86135 Augsburg
Germany

Tel: +49-821-598-2236
Fax: +49-821-598-2280

Simon.Urbanek@Math.Uni-Augsburg.de
http://simon.urbanek.info