2022.2

Table Of Contents
Script Profiler settings
Number of runs
Bydefault,theScriptProfilerrunson1000instancesofallthescripts.Totestonahigherorlowernum-
berofinstances:
1. Onthemenu,selectWindow > Preferences.
2. ClickScripting.
3. Setanumberofiterations(maximumonebillion)andclickOK.
Sorting
IntheScriptsProfiler,thescriptsarebydefaultsortedbasedonthevaluesintheElapsedcolumn,
fromhightolow.Clickanyofthecolumnstosortthescriptsaccordingtothevaluesinthatcolumn.
Scripttimeout
Whentestingscripts,eitherbytogglingtoPreviewmodeorbyusingtheScriptProfiler,ascripttimeout
isactiveintheDesigner,sothatscriptsthatneedaverylongtimetorunarestoppedafterasettime.
Youcanadaptthistimeouttoyourneeds,asfollows:
1. Onthemenu,selectWindow > Preferences.
2. ClickScripting.
3. Setatimeoutinseconds(forexample:2s)andclickOK.Theminimumtimeoutis1second.
Note: Thescripttimeoutisnotactivewhengeneratingoutput.
Optimizing scripts
Intheprocessofoutputgeneration,theexecutionofscriptsmaytakeupmoretimethannecessary.To
optimizeatemplate,ithelpstodisablescriptsthatdon'thaveaneffectontheoutput;see"Managing
scripts"onpage374.
Thistopicpresentsanumberofotherwaystospeedupscriptexecutionbyoptimizingthescripts.
UseanIDorclassasselector
Scripts(exceptControlScripts)startwithaquery.TheselectorinthesecondcolumnintheScripts
paneiswhatascriptlooksforinthetemplate.Theselectorcanbeatext,HTML/CSStags,oracom-
binationoftextandHTML/CSStags.
Lookingfortextinatemplateisalessoptimizedoperationandmayimpactoutputspeedsinlongerdoc-
uments.Tospeeduptheoutputprocess,itisrecommendedtouseanIDorclassasselectorinstead.
Page 380