The approximate_formats() template function will show what formats are recorded in the database. The formats() template function will show what formats actually exist - that's why its slow, it interrogates the file system, The calibre database is memory resident, that's why it's fast.
There is no reason to use the formats() function, the Check Library feature provides a comprehensive réconciliation of the database with the file system.
|