Eliezer
Eliezer

Reputation: 7347

SharedPreferences or SQLite Database?

I'm writing a small alarm clock application, and I'm currently using SharedPreferences to store the settings for each alarm. I figured this would be more lightweight than using the SQLite Database, but now I'm thinking about writing a small thread-safe wrapper for SharedPreference. Am I being an idiot and should just use the database or would this still be more light-weight than the database?

Upvotes: 2

Views: 481

Answers (1)

ghostbust555
ghostbust555

Reputation: 2049

For something this small, how lightweight it is isn't really relevant. Its a matter of 10 nanoseconds versus 50 nanoseconds (not literally but you get the idea). Just use what is easier and more reliable for your app

Upvotes: 4

Related Questions