Does anyone have thoughts on the best way to deter...
# suitescript
s
Does anyone have thoughts on the best way to determine which of many scripts and workflows could be causing slowness with PDF generation using render.transaction ? Over the past few years the time it takes to generate an Invoice PDF has slowly increased to the point that it now takes 3 times as long per invoice. This has added several extra hours to our invoicing process (even with 2 SC+ licenses fully utilized). We have the APM bundle installed. Is there a better way than just disabling all UE scripts and workflows, then re-enabling them one at a time, and benchmarking the time difference in the script across a sampling of invoices? We have 15 scripts and 5 workflows, so i feel like it will be slow and tedious.
b
you should only need to look at scripts or workflows doing things in beforeload
s
Yeah, I can rule out three of the 15 based on not having a beforeLoad, but that doesn’t cut it down much.
b
sounds like your account is dieing, but in general you probably want to focus your effort on whichever before load is slow in general
there are no filtering options to limit it to the print type
s
I thought ‘print’ was one of the context types in a User Event script?
b
not for apm
if your user event scripts dont do type filtering in general, then you should start there
s
The majority of the UE’s are third-party (from a locked bundle).
So all we can really do is undeploy them
Two of them are our own user event scripts, so I can make sure they aren’t running when not necessary.
b
then the only thing apm can do is tell you which is the slowest before load user event script in general
s
yeah, I used to know how to look it up, but is has been a while. I know there was an APM page to view scripts by record type.
Honestly, knowing the slowest one wouldn’t be be bad. At least I could chip away at the worst offenders first.
The odd part is that Invoice generation (creation) is actually faster now than it has ever been. In fact most things have gotten faster, while PDF generation has gotten worse. That is the part that is the most confusing. I suppose the template/PDF generation (Freemarker or BFO) could have degraded somehow, and it’s not due to any scripts at all. The template itself hasn’t changed much in the last four years.