Candido said:
Now, what if there was a way to override Mushclient's default behavior and have it only redraw on the prompt (with a manual call to Repaint), letting any lines in between process without being visible until a prompt appears. Would this result in a performance gain, or does Mushclient already redraw in blocks based on the size of incoming packets?
MUSHclient invalidates the text rectangle upon changing the output buffer. This causes Windows to schedule a redraw which is a low-priority message. That is, it happens after all incoming packets have been received. So it doesn't redraw in blocks, nor based on any particular size. It's when there is nothing much else to do.
Doing a Note (ColourNote etc.) per se does not do anything except add more data to the in-memory buffer (and invalidate the rectangle). So noting should be fast, in that it is just memory manipulation.
What is the real problem here? The client can process notes much faster than you can read the results. For example:
s = utils.timer ()
for i = 1, 10000 do
ColourNote ("green", "blue", "hello, world")
end -- for
e = utils.timer ()
print ("time taken = ", e - s)
Results:
time taken = 1.7540601517539
Now you can't read 10000 lines in under two seconds.
In fact I ran that test a second time, with Fiendish's Tetris game underneath (so the text had to scroll under a miniwindow) and it took 0.74 seconds.
 |