Hi
Does anyone have any advice for how to get the FH plugin debug window in FH to run programs at a 'normal' speed?
My experience is that my code runs 50 times slower in the debug window than when run directly from the Plugin window... even after I've turned off Debug Mode and unchecked all the variable types with no discernible impact.
So I'm now running the plugin from the FH Plugin window and then debugging by feel (or writing FHMessageBoxes or outputting debug data to an external log file which is awkward).
My program is 2000+ lines long and processes a 6000+ person FH database....but the whole thing runs in 45 secs in FH direct, while it had only got to 10% in 4 minutes when run in the debug window with Debug Mode off. I don't have 40 minutes to run the plugin for each test run!
Any suggestions?
Thanks in anticipation.
Paul
* FH Plugin debug window runs very slowly
FH Plugin debug window runs very slowly
Paul Weaver, London
- Mark1834
- Megastar
- Posts: 2511
- Joined: 27 Oct 2017 19:33
- Family Historian: V7
- Location: South Cheshire, UK
Re: FH Plugin debug window runs very slowly
That's my experience as well. Any options for testing the plugin with a smaller dataset? Are there any steps in there that are likely to be particularly slow and resource-hogging?
Mark Draper
- tatewise
- Megastar
- Posts: 28414
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: FH Plugin debug window runs very slowly
I agree with Mark. For debugging, you need a small but representative subset of your FH database that explores all the conditional paths within your plugin script. There may also be run time improvements that could speed it up.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- ColeValleyGirl
- Megastar
- Posts: 5502
- Joined: 28 Dec 2005 22:02
- Family Historian: V7
- Location: Cirencester, Gloucestershire
- Contact:
Re: FH Plugin debug window runs very slowly
I have a small 'plugin test harness' project that includes a variety of relatively unusual data combinations to catch edge cases as well as more 'normal' data.
Helen Wright
ColeValleyGirl's family history
ColeValleyGirl's family history
Re: FH Plugin debug window runs very slowly
Thanks all...you're right of course re test data...if I was working I'd be the first to get it done properly, but dev is now a pastime so why let professionalism get in the way !
But I will implement a Named List feature today!
Cheers
But I will implement a Named List feature today!
Cheers
Paul Weaver, London
- tatewise
- Megastar
- Posts: 28414
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: FH Plugin debug window runs very slowly
If you were hoping that a Named List would hold the test case subset then that may not work well.
Unfortunately, there is no method via the FH plugin API to directly access records in a Named List.
You will have to loop through every record and use if fhCallBuiltInFunction( "IsInList", ptrRec, "ListName" ) then ...
Unfortunately, there is no method via the FH plugin API to directly access records in a Named List.
You will have to loop through every record and use if fhCallBuiltInFunction( "IsInList", ptrRec, "ListName" ) then ...
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry