Support lazy-loading contact attributes
Submitted by Travis Reitter
Link to original bug (#648805)
Description
As described in bug #646808 comment 0, the Folks model of "load all contacts' attributes immediately" doesn't scale as well now that we've added a lot more types of attributes.
To keep start-up load as light as possible, only Personas' linkable properties should be retrieved by default. This lets us guarantee that Personas will be linked into the same Individuals regardless of how many attributes have been retrieved. This coincides with the guarantee in bug #646808 that Individuals will have the same member Personas regardless of the search (though the values of non-searched attributes may vary depending on which attributes have been retrieved).
As a general design point, the mechanism for specifying which attributes to fetch should be settable both before and after IndividualAggregator.prepare() and PersonaStore.prepare() are called.
The use cases for the different set times:
Before prepare:
- clients know some non-linkable attributes they will always request (eg, Empathy requesting avatars), so this could let the PersonaStores avoid extra transitions (which might ripple into the UI).
After prepare:
- less-common UI components (eg, Empathy's "View Contacts on a Map" dialog) may need attributes that the common components don't (eg, geo-location)
- some clients may wish to prioritize retrieving all Individuals (ie, "breadth-first" retrieval) to filling in those Individuals' details
Version: git master