certi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RE: RE: Re: [certi-dev] CERTI performance issue


From: Eric Noulard
Subject: Re: RE: RE: Re: [certi-dev] CERTI performance issue
Date: Tue, 16 Jun 2009 13:09:30 +0200

2009/6/16 Gotthard, Petr <address@hidden>:
>> After you tried the Petr solution I would advise you to
>> add an usleep(5 * 1000)  BEFORE ticking the first time
>> (may be put before the while loop) this may leads you
>> to grantArrived with no further sleep most of the time, thus
>> you'll drop the number of tick too.
>
> I think the most optimal solution is without any sleep. You could save a
> millisecond by using usleep(4*1000) instead. ;-)

Yes off course. 2 arguments tick is the definitely the best way to go.
In fact we already know that Michael got a 1200s to 52s acceleration using
the 2-args tick.
But we don't know what value of min/max he used.

My advice with usleep etc... was "for investigation only", I should
have mentioned that.

> Why don't you do just:
>
>    nextEventRequest( ... )
>    while( true )
>    {
>        tick(1.0, 0.0);
>
>        if( grantArrived )
>                 break;
>    }

This is definitely the best solution.

> Such tick would wait only until the grant arrives. Not a single
> millisecond more.

Yes precisely because the wait is done by the select syscall itself,
see:
libCERTI/Communications.cc::Communications::readMessage
lines 259--265


-- 
Erk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]