Is FlatBuffers faster than SharedPreferences

已查看 63 次
跳至第一个未读帖子

minh duc pham

未读,
2017年3月31日 06:49:352017/3/31
收件人 FlatBuffers
Hi all,

Like the subject, I wonder if FlatBuffers is faster than SharedPreferences. My mobile application uses about 3000 key-value sets using SharedPreferences, and the value is just the primitive type, any other object types is not much (and I believe FlatBuffers can handle this perfectly). So I wanna ask "is it worth moving from SharedPreferences to FlatBuffers?"

Thank you very much for any your thoughts
MinhPham

Maxim Zaks

未读,
2017年3月31日 08:34:472017/3/31
收件人 FlatBuffers
I am not sure what to tell you about storing 3000 key value sets in SharedPreferences :)
But generally as far as I see SharedPreferences are stored as XML file.
Reading this amount of data from FlatBuffers will be definitely faster. Specially if you need only a fraction of 3000 values.
Writing should be more performant as well, but I suggest you profile/measure it.

minh duc pham

未读,
2017年4月3日 22:27:582017/4/3
收件人 FlatBuffers
Thank you very much Maxim, I'll consider it :). 
回复全部
回复作者
转发
0 个新帖子