Quote:
Originally Posted by ownedbycats
New question: Is there a way to test the performance of a template? I suspect one of my composites is causing slowness, but I'm not sure which one it is.
|
No, there isn't any profiling for templates. And I am not sure it would be useful in the face of templates that refer to other templates.
In my experience performance problems arise if a composite is used for sorting or searching. This requires calibre to evaluate the column for every book in the (virtual) library. In other cases the composite is evaluated when it is to be displayed.
Also note that most of the time a GPM template is faster than a TPM or Single Function Mode template. Reason: calibre can cache the "compiled" GPM template.
Finally, some functions are just slow, such as any of the format_* functions that must look at the disk to get the answer.