Page 1 of 1

Lag remedy

Posted: Tue Dec 04, 2018 11:00 am
by Cornflower
I've noticed some lag recently. DM Eaze sometimes pauses the game to allow parts of the engine to catch up (database access and whatnot). Another thing, since the loadtime and lag seems more pronounced in the Keep, perhaps remove some citizens. I mean, I love the kids playing tag, but all those OnHeartbeat things create lag (unless something's changed since I was fiddling with worlds).

Side note: I still have a lag-measuring script laying around. It's kinda primitive, you switch it on in game and it tells you about the lag, but it could easily be converted to be more useful if needed.

Re: Lag remedy

Posted: Tue Dec 04, 2018 12:00 pm
by driller
I have profiling with NWNX, it has been a while since I ran it though. IIRC, the worst offender is the event driven perception scripts, not the heartbeat ones.

Re: Lag remedy

Posted: Tue Dec 04, 2018 3:19 pm
by Cornflower
driller wrote: Tue Dec 04, 2018 12:00 pm I have profiling with NWNX, it has been a while since I ran it though. IIRC, the worst offender is the event driven perception scripts, not the heartbeat ones.
I'm sure you're way more up to date than me. When I ran my world split on two servers, the OnHeartbeat was the Devil.

Re: Lag remedy

Posted: Tue Dec 04, 2018 6:03 pm
by driller
Most of my custom heartbeats use local variables and no loops, unless I have no other choice, in that case I cache or delay execution.
Cornflower wrote: Tue Dec 04, 2018 3:19 pm
driller wrote: Tue Dec 04, 2018 12:00 pm I have profiling with NWNX, it has been a while since I ran it though. IIRC, the worst offender is the event driven perception scripts, not the heartbeat ones.
I'm sure you're way more up to date than me. When I ran my world split on two servers, the OnHeartbeat was the Devil.