Welcome to the Builder Academy

Question Trigger Lag

More
13 Oct 2017 01:29 #6981 by Gahan
Trigger Lag was created by Gahan
Just a question. I develop on a mud with a very active playerbase. We have a ton of perks like storage lockers and weightless containers and such. We've come to realize that dg_triggers are very laggy. If you have a character with more than a few hundred pieces of gear in a storage locker or sitting in their inventory, they actually produce lag when they do anything associated with saving/quitting/storage locker interaction... basically anytime all these objects with triggers get saved to a plrobjs file or storage locker file or house file for that matter. Any thoughts or suggestions about finding new routines to handle triggers when saving? Like perhaps handling object saving to be handled on a different pthread or something? I'm kind of at a loss how to not let this get worse without restricting characters, which I don't want to do... the MUDs player base is loyal and regularly donating to keep things going. Any thoughts at all?
The following user(s) said Thank You: zusuk

Please Log in or Create an account to join the conversation.

More
13 Oct 2017 05:42 #6983 by zusuk
Replied by zusuk on topic Trigger Lag
I have not noticed any issues with objects with lots of triggers causing lag in saving... it could be the issue lies elsewhere?

Have you tried running your MUD under valgrind or another memory debugger to see if you got some sort of memory leak?

How does your saving function for your storage lockers compare to other object-saving functions such as rent or house?

Really kind of just stabbing in the dark without any code to look at :)

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

More
13 Oct 2017 08:48 #6985 by zusuk
Replied by zusuk on topic Trigger Lag
So I re-read and took note that you said a few hundred items with a script.. I only tested it with 99 scripted objects on my character.

Tested it with 198 - no issue.
297 - noticing a bit of lag
396 - like 3 secondish lag on our server
495 - like 5 secondish lag

Yeah so this definitely needs addressing if you see your players with tons of scripted objects. I put it in our in-game bug list to look at as soon as possible, but hopefully we can get one of the specialists like Thomas to give some feedback on this.

Regards,
Mosheh (Zusuk)

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

More
13 Oct 2017 11:18 #6986 by Gahan
Replied by Gahan on topic Trigger Lag
Yeah its honestly not uncommon for anyone on our mud to have ATLEAST 100 items on them with scripts attached to them. Its definitely a problem when you have several players online at the same, especially high level ones with the better gear. Things can really get slowed down. When you get up around the 1000 item mark it goes up to 7 seconds. My real test was loading 10,000 objects on my character without triggers no visible lag, loaded 10,000 objects with triggers on them and there was about a 15-20 second lag, each save, each interaction with locker. lol.

Please Log in or Create an account to join the conversation.

More
13 Oct 2017 11:32 #6987 by zusuk
Replied by zusuk on topic Trigger Lag
Yeah that is clearly a critical issue on your MUD, I wonder if saving to a database would be faster or slower. Hoping to look at this next week if we do not get someone else to address this issue.

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

More
13 Oct 2017 11:47 #6988 by Gahan
Replied by Gahan on topic Trigger Lag
Yeah including myself, I have one or two other people looking into the issue as well at our codebase to see if we can come up with some kind of fix, still nothing yet. I'd love to hear any feedback or revelations you or anyone in the community finds that we could work together to make triggers operate a little bit more efficiently. I'll post any findings here.

Please Log in or Create an account to join the conversation.

Time to create page: 0.497 seconds