Skip to content

Optimize DataStore::setItemsFlags to not fetch item flags again.

David Faure requested to merge work/dfaure/use_item_tags into master

Attaching perf to akonadiserver while deleting 10k items (and possibly some background mailcheck...) showed this in Hotspot: http://www.davidfaure.fr/2020/hotspot_pimitem_flags.png

Clearly this is calling PimItem::flags() (which makes a SQL query) twice, once in ItemCreateHandler and again in DataStore::setItemFlags. Just pass the flags from the former to the latter.

Edited by David Faure

Merge request reports