[Verse-dev] Timing problem on Mac OS X

Eskil Steenberg eskil at obsession.se
Mon Feb 14 15:42:23 CET 2005


Hi!

> for(passed = 0; passed <= microseconds && VConData.pending_packets == 0;
>     passed += V_CON_MAX_MICROSECOND_BETWEEN_SENDS)
> {
>         if(V_CON_MAX_MICROSECOND_BETWEEN_SENDS < microseconds - passed)
>                 v_n_wait_for_incoming(V_CON_MAX_MICROSECOND_BETWEEN_SENDS);
>         else
>                 v_n_wait_for_incoming(microseconds - passed);
>         v_con_network_listen();
>         connection = VConData.current_connection;
>         for(VConData.current_connection = 0; VConData.current_connection <
> VConData.con_count; VConData.current_connection++)
>                 v_noq_send_queue(VConData.con[VConData.current_connection].out_queue,
> &VConData.con[VConData.current_connection].network_a\
> ddress);
>         VConData.current_connection = connection;
> }
>
> runs very badly on Mac OS X. It *seems* to be the case that a call
> to v_n_wait_for_incoming() always takes on the order of 10 ms, but
> the value of V_CON_MAX_MICROSECOND_BETWEEN_SENDS is 1000, i.e. 1 ms.
>
> The loop above blindly assumes that wait_for_incoming() always does
> the right thing, and doesn't in fact *measure* the time spent, so
> it's fooled and things take too long time.

I dont think that is a problem, Yes it would be nice if select did what
you told it to, but this loop mainly makes sure that select is callded
again if some thing comes from the net before the time out. Yes it may
hurt the out going flow, but is it a big problem for you?

> Eskil: have you run R4 on Mac OS X successfully?

Yes, i think so. I just compiled it and it looks to work just like on the
Win32 machine. I cant say I have done any extensive tests since it should
work, and on my mac it shows no sign of not working.

By the way, the Quel solaar rendering engine is comming along nicely, and
I now have polygons on screen and am now working to get all featiures in.

E



More information about the Verse-dev mailing list