Quote:
Originally Posted by davidfor
Has that changed? I'm sure someone said it was slower. But, as I prefer GPM, that's good.
|
When I first implemented GPM I compiled the templates into python. That didn't work out when the formatter started being used in threads so I took it out. That could be the source of the thought that GPM is slower.
GPM will be slower for trivial templates such as "{authors}". It should be faster for things like "{authors:sublist(1,2,&)}". It will be faster for TPM templates like "{authors:'sublist($,1,2,'&')'}" because the quoted part is treated as a GPM template.
Quote:
Maybe I am thinking of using template functions.
|
Template functions are the fastest option, assuming that they do something more than return a metadata field. They are compiled into python executable code so the only overhead is looking up the function and passing the arguments.
Of course, the right way to answer the question is to time equivalent templates/programs, but I am too lazy.