Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Can we extend the library to store it in any persistent data store #47

Open
techwizardg opened this issue Mar 21, 2017 · 1 comment
Open

Comments

@techwizardg
Copy link

This is not an issue but asking how to do the same. Assuming a phone with 5000 contacts(i.e. today this scenario is very common with gmail syncing all emails to your phone book too), it is not good to read them every time an application needs and instead can this be read and persisted in data store like SQLLite and then use listener to look for changes in address book and update the same in SQLLite.Is this possible using ohana?

@NickEntin
Copy link
Contributor

Should be fairly straightforward to do by creating a custom data provider that manages the SQLLite database and loads in the data from the address book. It could then listen for changes and update the database appropriately. You would then use this data provider instead of one of the provided ones.

I would be interested in seeing if you get a significant performance increase from this. Initially I would suppose that more of the time is spent on creating the OHContact instances than reading the data, but I haven't run tests on it, so I can't say for sure.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants