@davidfor: From Peter's description it looks to me like updating the database for a large number of books is slower with the new backend in your plugin.
This is because the new backend operates in auto-commit mode. That is after every change, the database is committed. So if you are making changes to a lot of database records, you should do them in bulk. For example, to change the the #xyz field in for a number of records, in the old db you would do:
Code:
for book_id in book_ids:
db.set_custom(book_id, val, label='xyz', commit=False)
db.commit()
With the new db you should instead do:
Code:
if hasattr(db, 'new_api'):
db.new_api.set_field('#xyz', {book_id:val for book_id in book_ids})
else:
# do it the old way