View Single Post
Old 03-03-2024, 06:34 PM   #133
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: 11,771
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
Is get_note() inherently rather slow, or only when it contains uuencoded images?

BR
get_note() and has_note() must query the notes database to find if a note is associated with the field (column) and field value. How fast this is depends on how much caching sqlite does with the database, and to a minor extent how many notes exist.

If there are images in a note then they also must be fetched from the notes database and converted to base64. This of course adds to the running time.

If you sort or search on the note composite then the above will happen for every book in the library. I have no idea whether some plugins will evaluate the column for all books.

I haven't noticed any particular problem with get_notes() speed on my test library, but then I don't do anything that would require evaluating that column for every book.
chaley is offline   Reply With Quote