performance

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
guialtran
Grandmaster Poster
Posts: 120
Joined: Wed Jul 30, 2008 12:42 pm

performance

Post by guialtran »

There is some loss of performance?

var cfg_file := ReadConfigFile( ":Books:itemdesc" );

or

var cfg_file := ReadConfigFile( ":*:itemdesc" );
User avatar
*Edwards
Forum Regular
Posts: 303
Joined: Fri Dec 28, 2007 11:19 pm

Re: performance

Post by *Edwards »

Which you think is the best?

ReadConfigFile( ":*:itemdesc" ); -- Will read all itemdesc.cfg from all packages.

ReadConfigFile( ":Books:itemdesc" ); -- Will read itemdesc.cfg from ":Books:itemdesc" only.


Personally, I prefer to read only the necessary files. But it shouldn't affect your sysload if the script is not called too often like a combat script.
guialtran
Grandmaster Poster
Posts: 120
Joined: Wed Jul 30, 2008 12:42 pm

Re: performance

Post by guialtran »

and if it is used for a spell?
guialtran
Grandmaster Poster
Posts: 120
Joined: Wed Jul 30, 2008 12:42 pm

Re: performance

Post by guialtran »

I tested, not slow it is, has the same speed
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: performance

Post by Turley »

Of course reading all cfg files is slower, but only the first time then it is cached.
Post Reply