[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
forum.kymlun.com • View topic - Script profiling

Login | Register


All times are UTC + 1 hour [ DST ]


It is currently Mar 28th, '24, 22:00




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: Script profiling
PostPosted: Nov 17th, '08, 15:14 
Twilight Council
User avatar

Joined: Nov 24th, '04, 18:55
Posts: 620
Location: The zephyr lands 'neath the brine

_________________
What the king dreams, the Hand builds.


Top
 Offline Profile  
 
 Post subject: Re: Script profiling
PostPosted: Nov 17th, '08, 16:29 
Twilight Council
User avatar

Joined: Nov 24th, '04, 18:55
Posts: 620
Location: The zephyr lands 'neath the brine
On a side note, three of the worst scripts nw_c2_default1, x2_def_heartbeat and nw_c2_default9 are not or almost not different from the standard Bioware scripts of the same name. Whether that means they're inefficient, used in too many places or there's nothing wrong with script performance, I don't know.

The 'high drain' scripts in question are practically all Spawn, Perception or Heartbeat scripts, which is as you'd expect.
In addition there are some temporary, 'one-shot' spikes like when the module loads, an area loads, or unloads, a tailor model is updated or a store is opened. These might do with some streamlining but aren't the main cause of what we experience now.

_________________
What the king dreams, the Hand builds.


Top
 Offline Profile  
 
 Post subject: Re: Script profiling
PostPosted: Nov 17th, '08, 16:38 
Twilight Council
User avatar

Joined: Nov 24th, '04, 01:09
Posts: 2367
Location: TOOOOLSET!!
Great job so far, Lore. I'll import things tonight and we'll see what happens.

_________________
"There is no Sparta.
THIS. IS. SPOON!!"


Top
 Offline Profile  
 
 Post subject: Re: Script profiling
PostPosted: Nov 17th, '08, 19:10 
Level 9 Player Character
User avatar

Joined: Apr 12th, '08, 06:08
Posts: 213
Location: how do i failed rp?
Painfully Obvious Tip That Will Probably Insult Your Intelligence But Who The Hell Knows Maybe You Forgot About It: Tried caching scripts?

_________________
One must have chaos in oneself to give birth to a dancing star.


Top
 Offline Profile  
 
 Post subject: Re: Script profiling
PostPosted: Nov 17th, '08, 20:00 
Twilight Council
User avatar

Joined: Nov 24th, '04, 18:55
Posts: 620
Location: The zephyr lands 'neath the brine
Naturally. Although opinions are divided on whether that does or does not improve performance.

_________________
What the king dreams, the Hand builds.


Top
 Offline Profile  
 
 Post subject: Re: Script profiling
PostPosted: Dec 15th, '08, 14:24 
Twilight Council
User avatar

Joined: Nov 24th, '04, 18:55
Posts: 620
Location: The zephyr lands 'neath the brine
As it turns out the move away from area heartbeats to module heartbeats improved the total script performance by 27%.
However, the performance only actually decreased by 10% between the two evaluated runs, with pathfinding in particular taking up a greater share this time. That's indicative of a relatively large fluctuation based on player actions.

The breakdown is as follows:
34% nw_c2_default9
23% zep_torchspawn
15% Pathfinding difficulties
11% 25 scripts
5% nw_c2_default1
4% lw_onareaenter
3% x2_def_heartbeat
(5% all other scripts)

The now empty lw_onareahb script still accounts for 0.75% of total performance due to being called so often, which leads me to believe that even the contribution of the nw_c2_default9 and zep_torchspawn scripts to the total lag are minimal - you can't get much more efficient than having no code at all.
Where the problem does lie, I can't say.

_________________
What the king dreams, the Hand builds.


Top
 Offline Profile  
 
 Post subject: Re: Script profiling
PostPosted: Dec 15th, '08, 22:42 
Twilight Council
User avatar

Joined: Nov 13th, '06, 13:41
Posts: 1249
Location: In ur base killin ur doods.
Can I grab a copy of the updated scripts please?

vincecole6@hotmail.co.uk

_________________
Never under estimate the power that language imparts. Sticks and stones may break your bones, but words can break hearts.

Image


Top
 Offline Profile  
 
 Post subject: Re: Script profiling
PostPosted: Mar 11th, '10, 16:08 
Twilight Council
User avatar

Joined: Nov 24th, '04, 18:55
Posts: 620
Location: The zephyr lands 'neath the brine
RESOLUTION:
Data was saved for future comparisons.

_________________
What the king dreams, the Hand builds.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron