View Single Post
Old 07-17-2021, 05:42 PM   #143
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,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Question:
...
Performance isn't an issue, it's only run on demand. But since the "Loans" virtual library only criteria is that the book has an .OVERDRIVE format, would it be better practice to check for that rather than the VL?
It depends on how you check for the format. If you use approximate_formats() then doing
Code:
'OVERDRIVE' inlist approximate_formats()
will be slightly faster unless you are reasonably sure the #vls column is already evaluated (e.g., it is displayed in a column). In any event the difference will be minor.

If you use any of the formats_???() functions then the time needed to touch the disk to check the physical files will swamp any template processing time.
chaley is offline   Reply With Quote