From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.157.10.97 with SMTP id 88mr5285528otg.9.1459352157482; Wed, 30 Mar 2016 08:35:57 -0700 (PDT) X-Received: by 10.182.40.227 with SMTP id a3mr107319obl.14.1459352157442; Wed, 30 Mar 2016 08:35:57 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!nt3no6004450igb.0!news-out.google.com!ha2ni108igb.0!nntp.google.com!nt3no6004445igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 30 Mar 2016 08:35:57 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=216.98.56.20; posting-account=MRPdDAoAAADUJmZVjnYaoafXFMadSeY1 NNTP-Posting-Host: 216.98.56.20 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8f3d3515-aa1a-4d7c-b465-3ad25c902ae5@googlegroups.com> Subject: Roundtrip latency problem using Gnoga, on Linux, when testing at localhost address From: Olivier Henley Injection-Date: Wed, 30 Mar 2016 15:35:57 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:29923 Date: 2016-03-30T08:35:57-07:00 List-Id: 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(); }