View Single Post
Old 06-29-2021, 01:28 PM   #111
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Now that it's fixed in source, would changing them back to variables make the template run any more efficiently?
Yes, but probably not enough to notice. Turning something into a variable is good from an efficiency standpoint only if the variable is used more than once. In terms of speed improvement: on a reasonable computer, fetching a variable is sub-microsecond. Doing a field reference is probably about 10 times slower, but that isn't really slow in the grand scheme of things.
Quote:
ideally, it'd also check that $#kobobookmark starts with OEBPS/file but I've not quite figured out how to get it working yet.
Assuming 'a' is set and that it is not tags-like then something like
Code:
&& 
      substr(a, 0, 10) == 'OEBPS/file'
should work. You could probably get rid of the test for non-empty.
chaley is offline   Reply With Quote