Send translation requests and replies as ALERT
2 posters
Page 1 of 1
Send translation requests and replies as ALERT
Just testing something here
- 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
Re: Send translation requests and replies as ALERT
I will need more information about that
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?
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- Admin
- Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France
Re: Send translation requests and replies as ALERT
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.
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
Re: Send translation requests and replies as ALERT
Fair enough. I will look into it
Ellypse- Admin
- Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum