From: Olivier Henley <olivier.henley@gmail.com>
Subject: Roundtrip latency problem using Gnoga, on Linux, when testing at localhost address
Date: Wed, 30 Mar 2016 08:35:57 -0700 (PDT)
Date: 2016-03-30T08:35:57-07:00 [thread overview]
Message-ID: <8f3d3515-aa1a-4d7c-b465-3ad25c902ae5@googlegroups.com> (raw)
Hey,
I am trying a small multiplayer 2d game using Gnoga and Phaser.io and and I
am experiencing some 80 ms for any roundtrip test when trying my game at
127.0.0.1:8080. I profiled javascript and it looks like it take 0.4 ms on
the client side to process round_trip().
Anyone has an idea about what is wrong?
Thx,
Olivier
p.s: Here is my roundtrip code:
---- Ada code ----
App_Data.Roundtrip_Input.On_Change_Handler (Handler => On_Roundtrip'Access);
...
loop
App_Data.Last_Roundtrip_Start := Clock;
Gnoga.Server.Connection.Execute_Script (ID => App_Data.Window.Connection_ID,Script => "round_trip();");
delay 0.5;
end loop;
...
procedure On_Roundtrip (Object : in out Gnoga.Gui.Base.Base_Type'Class) is
App_Data : App_Data_Access := App_Data_Access (Object.Connection_Data);
Roundtrip_Duration : Duration;
begin
App_Data.Roundtrip_Span := Clock - App_Data.Last_Roundtrip_Start;
Roundtrip_Duration := To_Duration (App_Data.Roundtrip_Span);
Put_Line ("---- Roundtrip ---- : " & Duration'Image(Roundtrip_Duration));
-- output about 0.080 using Chrome
-- output about 0.120 using Firefox
end On_Roundtrip;
---- Javascript code ----
function round_trip()
{
var round_trip_date = new Date();
$('#rt').attr('value', round_trip_date.getTime()).change();
}
next reply other threads:[~2016-03-30 15:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 15:35 Olivier Henley [this message]
2016-03-31 4:47 ` Roundtrip latency problem using Gnoga, on Linux, when testing at localhost address rieachus
2016-03-31 5:23 ` Jeffrey R. Carter
2016-03-31 7:38 ` Dmitry A. Kazakov
2016-03-31 17:02 ` Olivier Henley
2016-03-31 17:44 ` Dmitry A. Kazakov
2016-03-31 16:39 ` Olivier Henley
2016-03-31 20:46 ` Jeffrey R. Carter
2016-03-31 21:14 ` Dmitry A. Kazakov
2016-04-01 0:32 ` Dennis Lee Bieber
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox