2022.2

Table Of Contents
paign.Toviewthecampaign,logintoMailjetandchoose:Campaigns>All.
Optimizing a template
Thistopicdescribessomewaystooptimizeatemplateinordertospeeduptheoutputprocess.
However,thetemplateitselfisnottheonlyfactortobetakenintoaccount.Theserverconfigurationand
hardwareconfigurationhaveaninfluenceontheoutputspeedaswell.Foradviceonservercon-
figurationandhardwareconfiguration,see"PerformanceConsiderations"onpage20.
Scripts
Intheprocessofoutputgeneration,theexecutionofscriptsmaytakeupmoretimethannecessary.
Here'swhatyoucandotoshortenthattime.
l
Use efficient selectors.Usingverypreciseselectorsinscriptswillbemuchfasterthanusinga
textselector,especiallyonlargedocuments.See"UseanIDorclassasselector"onpage381.
l
Optimize your scripts.Customscriptswithnon-optimizedloopsandunnecessaryDOMmanip-
ulationscanslowdownContentCreation.UsetheDesigner'stestfacilitiestofindoutwhich
scriptscanbeimproved(see"Testingscripts"onpage376and"Optimizingscripts"on
page380).
l
Only run the necessary scripts.NormallytheDesignerwillrunallscriptsforeachandevery
recordandsection.YoucansavetimeintheprocessofContentCreationbyorganizingscriptsin
foldersandsettingtheirexecutionscopeorevendisablingthem(see"Managingscripts"on
page374).NotethatloadingaJavaScriptlibraryisgenerallyveryfastandisonlydoneoncefor
therecordset.
Page 883