Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old November 10th, 2015, 04:52 PM
If you're changing 9 spells all at once, I would actually build that into one foreach if you can? For example:

foreach pick in hero from BaseSpell where "thingid.spell1 | thingid.spell2 | thingid.spell3 | etc etc"
eachpick.field[sDC].value += 1
nexteach

It'll make your code look a lot nicer, and it'll be comparable performance to your 9 findchilds I think.

You can actually find out the performance of a script by going to Develop -> Floating Info Windows -> Show Task Performance. That info window shows you the evaluation time, in microseconds, of all scripts that ran last evaluation. When I'm doing profiling stuff, I typically do 3-5 runs of each to get a good average, then compare the averages against each other.
Colen is offline   #11 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old November 10th, 2015, 04:54 PM
Quote:
Originally Posted by Colen View Post
You can actually find out the performance of a script by going to Develop -> Floating Info Windows -> Show Task Performance. That info window shows you the evaluation time, in microseconds, of all scripts that ran last evaluation. When I'm doing profiling stuff, I typically do 3-5 runs of each to get a good average, then compare the averages against each other.
OK filing that away for future use. I had no idea.
AndrewD2 is offline   #12 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old November 10th, 2015, 07:03 PM
Quote:
Originally Posted by Colen View Post
If you're changing 9 spells all at once, I would actually build that into one foreach if you can? For example:

foreach pick in hero from BaseSpell where "thingid.spell1 | thingid.spell2 | thingid.spell3 | etc etc"
eachpick.field[sDC].value += 1
nexteach
That is pretty much what I have. Was just wondering if 9 findchilds would be faster as I was trying to prevent the need of two foreach loops at two different timings. I currently found a more "middle" ground timing and it all appears to be happy again.

Quote:
Originally Posted by Colen View Post
You can actually find out the performance of a script by going to Develop -> Floating Info Windows -> Show Task Performance. That info window shows you the evaluation time, in microseconds, of all scripts that ran last evaluation. When I'm doing profiling stuff, I typically do 3-5 runs of each to get a good average, then compare the averages against each other.
Yeah with Andrew on this one. No idea that existed. Will be using that for some testing. Thanks Colen!

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #13 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:44 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.