Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
[performance] get all extra metadata at once if possible
Browse files Browse the repository at this point in the history
Doing multiple queries for this also meant multiple model updates,
and multiple contact field parsing on the sqlite side.
  • Loading branch information
amtep committed Sep 17, 2014
1 parent ff84e74 commit 4f14731
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/seasidecache.cpp
Expand Up @@ -1718,7 +1718,9 @@ void SeasideCache::startRequest(bool *idleProcessing)

// Load extra data items that we want to be able to search on, if not already fetched
if (unfetchedTypes & SeasideCache::FetchOrganization) {
fetchType = SeasideCache::FetchOrganization;
// since this uses allFilter(), might as well grab
// all the missing detail types
fetchType = unfetchedTypes;
m_fetchRequest.setFilter(allFilter());
} else if (unfetchedTypes & SeasideCache::FetchPhoneNumber) {
fetchType = SeasideCache::FetchPhoneNumber;
Expand Down

0 comments on commit 4f14731

Please sign in to comment.