Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Lua
➜ Performance
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| WobblingEars
(4 posts) Bio
|
| Date
| Sun 10 Feb 2013 06:36 PM (UTC) |
| Message
| Hi!
I have been scripting some with Lua and mini windows. I have noticed small delays in the text output from the mud because of my scripts.
I was just wondering if there is any way to prioritize the regular text received from the mud and let my script finish whenever it can - in a way to circumvent potential script delays.
Or are there any other ways to minimize the potential delays my scripting could cause?
Also any tips about optimization, benchmarking or performance are gladly appreciated! =)
| | Top |
|
| Posted by
| Nick Gammon
Australia (23,169 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sun 10 Feb 2013 08:39 PM (UTC) |
| Message
| | Are you calling the Redraw function? If you change a miniwindow's contents, but don't call Redraw, the change will be noticed next time the main window is redrawn, eg. when more data arrives from the MUD. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| WobblingEars
(4 posts) Bio
|
| Date
| Reply #2 on Sun 10 Feb 2013 09:29 PM (UTC) |
| Message
|
Hi Nick!
Thank you for answering!
I have been fiddling with a mapper plugin of my own. In that I call WindowCreate again to "redraw" the map and it seems to be working just fine.
My issue is the other way around. Data arriving from the MUD seems to be waiting for scripts to finish before the text is displayed. Perhaps it only concerns using mini windows?
It's really not a big problem - the delay is very short. I'm just looking for tips on how to try to preserve the awesome speed Mushclient has while I'm adding my own plugins to it. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,169 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Sun 10 Feb 2013 09:35 PM (UTC) |
| Message
| You shouldn't need to call WindowCreate every time. There would be a bit of an overhead. Emptying the window (there is WindowRectOp for that) and then calling WindowShow (to force the redraw) should do it.
Quote:
Data arriving from the MUD seems to be waiting for scripts to finish before the text is displayed. Perhaps it only concerns using mini windows?
What text? Normal text is drawn as it arrives, as a whole line may not arrive at once. Then when the newline arrives all triggers are processed. Read more here:
My own testing (plus using the Aardwolf version of the client) shows you can generally have a great deal happening at once with only minimal delays.
I think there are some tips in another thread about general optimization techniques. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Nick Gammon
Australia (23,169 posts) Bio
Forum Administrator |
| Date
| Reply #4 on Sun 10 Feb 2013 09:36 PM (UTC) |
| Message
| Read this:
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| WobblingEars
(4 posts) Bio
|
| Date
| Reply #5 on Sun 10 Feb 2013 09:56 PM (UTC) |
| Message
| Thank you very much!
Yes, I suspect the WindowCreate function is my culprit.
Great forum threads - just what I was looking for! =) | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
19,665 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top