I published several custom printing services on my server and they all works well but each call to the GetLayoutTemplateInfo task is very slow (12 seconds in my case for 4 printing templates).
As to update of the list of the printing templates we need to republish the service, why this task takes so long?
Is there a way to make it faster?
Thanks for your advice or explanations.
david
Solved! Go to Solution.
Can you pls check if you have any layers in your .pagx files? GetLayoutTemplateInfo task basically opens/loads each .pagx files in the memory (just like what would happen when you double-click to open them in ArcGIS Pro) and then read information off the layout.
Can you pls check if you have any layers in your .pagx files? GetLayoutTemplateInfo task basically opens/loads each .pagx files in the memory (just like what would happen when you double-click to open them in ArcGIS Pro) and then read information off the layout.
Thanks @TanuHoque for your quick answer.
I removed maps referenced in the pagx and republished the service and it reduced the request time from about 12s to 7s 🙂
It sounds strange to me that the GetLayoutTemplateInfo task actually loads each templates each time it is called. I saw in this help section that a change in a pagx file will be automatically discovered but it doesn't sounds like a usual use case.
To offer a better end-user experience, that would be great to have an option to "unable automatic change discovery in pagx" and always have the same layout template description served in milliseconds.
I'm glad it worked 🙂
It sounds strange to me that the GetLayoutTemplateInfo task actually loads each templates each time it is called.
We don't want to save any information in the memory. So that whenever you make any changes in those templates, those templates' updates get picked up in the next call.
Please note, client app such as Map Viewer or WAB print widgets don't make calls to this task very often. It should only make requests when you open widget first time in a session,