开发者

Effect of frequent sdcard writes

开发者 https://www.devze.com 2022-12-28 01:31 出处:网络
In my chat app, I am adding the ability to log chats. The logs are saved on the sdcard and one BufferedWriter is kept open for every person/channel chat is done with. I\'m wondering what effects this

In my chat app, I am adding the ability to log chats. The logs are saved on the sdcard and one BufferedWriter is kept open for every person/channel chat is done with. I'm wondering what effects this might have have on the s开发者_StackOverflowdcard and its life.

My BufferedWriter's buffer size is to 1024, I'm also wondering if that is too small or too big.


Flash memory cards have an endurance of about a million write cycles per area and probably include wear levelling which basically means trying to write to different areas so specific spots dont wear out.

So after about (sizeOfSDCard/sizeOfYourData)*1,000,000 writes, you will have ruined their card.

Practically, this means you probably aren't going to cause any harm.

0

精彩评论

暂无评论...
验证码 换一张
取 消