Send translation requests and replies as ALERT

View previous topic View next topic Go down

Send translation requests and replies as ALERT

Post  arekku on 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

View user profile

Back to top Go down

Re: Send translation requests and replies as ALERT

Post  Ellypse on 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, Culte de la Rive Noire, FR
Moedra, Kirin Tor, FR
Maison Celwë'Belore, Officer

Follow me and Total RP's development
on Twitter ! @EllypseCelwe
avatar
Ellypse
Admin

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

View user profile http://renaudparize.fr

Back to top Go down

Re: Send translation requests and replies as ALERT

Post  arekku on 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

View user profile

Back to top Go down

Re: Send translation requests and replies as ALERT

Post  Ellypse on Sun Mar 02, 2014 7:02 pm

Fair enough. I will look into it Very Happy 

_________________
Ellypse, Culte de la Rive Noire, FR
Moedra, Kirin Tor, FR
Maison Celwë'Belore, Officer

Follow me and Total RP's development
on Twitter ! @EllypseCelwe
avatar
Ellypse
Admin

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

View user profile http://renaudparize.fr

Back to top Go down

Re: Send translation requests and replies as ALERT

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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