The Featured Discussion Board Post this week is Finding a contact if contact ID is known using PIM API, started by Jim Ryan Quitevis
Jim wants to get a specific contact based on its ID, but the only option in the API appears to be iterating through the whole set using
ContactList::items(..) – which is is slow when large number of contacts are involved.
Nokia Developer Champion Amitabh Srivastava confirmed that this is a genuine limitation of the API and suggested a number of options. These included copying contacts from PIM to a recordstore and keeping them updated from using a periodic background process.
In addition it was suggested that an in-memory hashtable can be created of all contact names & their RMS record ID on every launch of the application. This RMS record ID could be used to directly search the contact record getting it from Hasttable. Finally, for better user experience, this could be backed-up to RMS on first launch of the application and synchronized further on demand.
This discussion was selected for featuring as it highlights a performance limitation of the PIM API with large numbers of records and provides a number of solutions.
Keep those interesting questions coming!
See About Featured Discussion Board Posts for more information.