Re: Inexplicable delay after sending a command. (Second-hand explanation)

Posted by Grekan on Tue 04 Feb 2020 02:20 AM — 8 posts, 29,444 views.

#0
So I was getting lag between the local echo on my screen and my input into the mud.

Similar as to described in this thread: https://www.gammon.com.au/forum/bbshowpost.php?id=9930

Just like the complaints in that thread, I was coming out of zMUD and could notice the lag.

Something about local echo in that thread triggered a thought, and I disabled it.

Delay instantly gone. The client became super responsive, faster than zMUD even.

Colour on local echo didn't make a difference, just that it was enabled.

No spam filter on, no spell check.

Just thought you'd like to know, even though the thread is old. I would have revived it, but that didn't seem to be an option.
USA Global Moderator #1
What server are you connecting to?
#2
Connecting to:
mud.prophecy.lu:4000

We're down a home page at the moment, sorry.

I definitely think it is more responsive with local echo off.
Australia Forum Administrator #3
Template:version
Please help us by advising the version of MUSHclient you are using. Use the Help menu -> About MUSHclient.
#4
Latest version - 5.06

We're running a heavily modified version of ROM that has been ported to the GO language.

Admittedly there does seem to be a tiny bit of input lag on the mud currently. But we (another mudder and I) observed turning off local echo reduced the lag for us.

Also thank you for your amazingly fast responses.
Australia Forum Administrator #5
Try installing this plugin to get a response time analysis.

Template:saveplugin=Response_Time_Detector
To save and install the Response_Time_Detector plugin do this:
  1. Copy the code below (in the code box) to the Clipboard
  2. Open a text editor (such as Notepad) and paste the plugin code into it
  3. Save to disk on your PC, preferably in your plugins directory, as Response_Time_Detector.xml
    • The "plugins" directory is usually under the "worlds" directory inside where you installed MUSHclient.
  4. Go to the MUSHclient File menu -> Plugins
  5. Click "Add"
  6. Choose the file Response_Time_Detector.xml (which you just saved in step 3) as a plugin
  7. Click "Close"
  8. Save your world file, so that the plugin loads next time you open it.



<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>

<muclient>
<plugin
   name="Response_Time_Detector"
   author="Nick Gammon"
   id="330370af54559a176b264f37"
   language="Lua"
   purpose="Calculates how long the MUD takes to respond"
   date_written="2020-02-04 14:19:04"
   requires="5.05"
   version="1.1"
   >
<description trim="y">
<![CDATA[
Calculates response time, puts it in the status bar.

Type: "reset response time average" to reset the average.

]]>
</description>

</plugin>


<aliases>
  <alias
   match="reset response time average"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>
  total_time = 0
  count = 0

  ColourNote ("green", "", "Average reset")
</send>
  </alias>
</aliases>

<script>
<![CDATA[

total_time = 0
count = 0

function OnPluginPacketReceived (pkt)
  if last_sent_time then
    diff = utils.timer () - last_sent_time
    last_sent_time  = nil
    count = count + 1
    total_time = total_time + diff
    SetStatus (string.format ("Response time: %0.6f s, average = %0.6f s", diff, total_time / count))
  end -- if
end -- OnPluginPacketReceived

function OnPluginSent (what)

  if not last_sent_time then
    last_sent_time = utils.timer ()
  end -- if no send in progress

end -- OnPluginSent

]]></script>

</muclient>



What it does is take the time from your last send to the MUD, to the first packet received back, and call that the response time. It also shows an average which you can reset by typing: "reset response time average".
Amended on Tue 04 Feb 2020 03:45 AM by Nick Gammon
USA Global Moderator #6
You might also want to show the time until the next newline .
Australia Forum Administrator #7
After chatting on the MUD we agreed that the issue was really that if you turn on the command echo, the delay between the immediate echo of the command, and the around 0.5 second wait for the MUD to respond, has a psychologically greater impact than if the command isn't echoed. If it is not echoed then you don't get that immediate feedback, and it "seems faster".

Using the response time plugin (above) I couldn't reliably get a slower response with command echo turned on.

What you can do is do commands with command echo turned on, and note the average response time (look in the status bar at the bottom).

Then clear the average (type "reset response time average") and try again, and compare the averages.