Lag remedy

Post suggestions for improvements here.
Post Reply
User avatar
Cornflower
Duke
Duke
Posts: 654
Joined: Sat May 26, 2018 10:53 am
Location: Sweden

Lag remedy

Post 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.
Who wills, can
Who tries, does
Who loves, lives
(Ann McCaffrey)
User avatar
driller
Site Admin
Site Admin
Posts: 4792
Joined: Tue Jul 04, 2006 8:52 am
Contact:

Re: Lag remedy

Post 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.
User avatar
Cornflower
Duke
Duke
Posts: 654
Joined: Sat May 26, 2018 10:53 am
Location: Sweden

Re: Lag remedy

Post 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.
Who wills, can
Who tries, does
Who loves, lives
(Ann McCaffrey)
User avatar
driller
Site Admin
Site Admin
Posts: 4792
Joined: Tue Jul 04, 2006 8:52 am
Contact:

Re: Lag remedy

Post 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.
Post Reply