ember-localforage-adapter icon indicating copy to clipboard operation
ember-localforage-adapter copied to clipboard

[Version 3] Handling of sync/async relationships

Open frederikbosch opened this issue 7 years ago • 2 comments
trafficstars

Please take into account that this library uses a key/value store as backend. From our experience saving records in a separate key caused a gigantic load when it involved many records. Then for every relationships the adapter had to talk to localforage. This made the app unusable. Therefore we introduced a cache and caching setting at the level of the adapter. You can choose between fetching everything at once, fetching per model type or fetching per model. See the README.md.

Maybe this can be improved, or replaced by new/better methodology.

frederikbosch avatar Nov 16 '18 13:11 frederikbosch

I like the cache approach. Have you tested it with > 10k records or other large numbers of things being accessed?

NullVoxPopuli avatar Nov 16 '18 13:11 NullVoxPopuli

Our app has around 1k-2k records. I believe I did testing back then with many more records. But memory was eventually becoming a problem. Especially because it had to perform on mobile phones from 6 years ago. So the answer of the performance is, of course, dependant on the use case. Another benchmark would be nice.

frederikbosch avatar Nov 16 '18 18:11 frederikbosch