View Single Post
Old 09-12-2021, 03:26 PM   #687
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,511
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by capink View Post
@chaley: Thanks for your response and help. I will have a look at it, and open the bug report, probably tomorrow, even though I've already bugged Kovid enough about this.
At least this report is as much about performance as avoiding the changed events. In some cases updating a field without changing the value actually updates the database, which I imagine should be avoided.

Tomorrow I hope to be able to push changes for review. I don't expect the changes to be complete or even correct, but they should provide something to work with.

With the changes I have made you get changed events for the set_field() operations, but with an empty book set. I don't know if it is worth trying to filter those out at the source. I have a test function that runs over a given library calling
Code:
set_metadata(id_, get_metadata(id_))
on each book. The test works if all changed events have an empty book set.
chaley is offline   Reply With Quote