Total RP 2
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Send translation requests and replies as ALERT

2 posters

Go down

Send translation requests and replies as ALERT Empty Send translation requests and replies as ALERT

Post  arekku Wed Feb 26, 2014 3:58 pm

Just testing something here Smile
Code:

# HG changeset patch
# User arekku
# Date 1393440897 -3600
#      Wed Feb 26 19:54:57 2014 +0100
# Node ID 9428dd2c52784557565fa4252404952297654887
# Parent  76818b037b3a4ce3ec391dccf0c1b3a3896a19a0
Send translations as alerts to minimize latency

diff -r 76818b037b3a -r 9428dd2c5278 totalRP2_Language/totalRP2_Language_Main.lua
--- a/totalRP2_Language/totalRP2_Language_Main.lua   Wed Feb 26 19:47:38 2014 +0100
+++ b/totalRP2_Language/totalRP2_Language_Main.lua   Wed Feb 26 19:54:57 2014 +0100
@@ -631,7 +631,7 @@
          if not TRP2_COLORREQUESTTAB[cible] then
             TRP2_COLORREQUESTTAB[cible] = color;
          end
-         TRP2_SecureSendAddonMessage("LATR",requete,cible);
+         TRP2_SecureSendAddonMessage("LATR",requete,cible,"ALERT");
       end
    end);
 end
@@ -654,7 +654,7 @@
    local texteTab = TRP2_DecoupageTexte(traduction, tailleRestante);
    table.foreach(texteTab, function(msgNum)
       local textToSend = tostring(requestTab[1])..TRP2_ReservedChar..tostring(requestTab[3])..TRP2_ReservedChar..tostring(requestTab[4])..TRP2_ReservedChar..texteTab[msgNum];
-      TRP2_SecureSendAddonMessage("LASN",textToSend,cible);
+      TRP2_SecureSendAddonMessage("LASN",textToSend,cible,"ALERT");
    end);
    --TRP2_debug("Traduction テ "..degradation.."%");
    --TRP2_debug("Traduction envoyテゥe テ "..cible);

arekku

Posts : 14
Join date : 2014-02-17

Back to top Go down

Send translation requests and replies as ALERT Empty Re: Send translation requests and replies as ALERT

Post  Ellypse Sat Mar 01, 2014 4:03 pm

I will need more information about that Razz
What kind of latency are you talking about? Players sending each other translation request? Does sending it as an alert really improves the latency? Then why not use it everywhere?
Ellypse
Ellypse
Admin

Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France

Back to top Go down

Send translation requests and replies as ALERT Empty Re: Send translation requests and replies as ALERT

Post  arekku Sun Mar 02, 2014 6:53 pm

Yes, there are 3 FIFO queues, and TRP only uses one of them.

TBF I think we should replace the current throttler with a real-time implementation, but maybe this is a good first step.

If there's a 14 KB state in the normal queue, the translation request or reply will be placed behind that and be transmitted after the state and be handled after 14000/800=17.5 seconds, bypassing that queue should get the translation delivered about 17 seconds earlier.

arekku

Posts : 14
Join date : 2014-02-17

Back to top Go down

Send translation requests and replies as ALERT Empty Re: Send translation requests and replies as ALERT

Post  Ellypse Sun Mar 02, 2014 7:02 pm

Fair enough. I will look into it Very Happy 
Ellypse
Ellypse
Admin

Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France

Back to top Go down

Send translation requests and replies as ALERT Empty Re: Send translation requests and replies as ALERT

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum