There have been a lot of comments to my "Why Persistent Storage Is A Good Thing" entry, as well as a great thread over on PocketPCThoughts. I’m going to write another few entries here to try to answer the questions my post brought up. I think I caught everything, but there was a lot of data. Sorry if I missed your question.
But you can only write flash so many timesA significant amount of discussion revolved around this issue. You can change the contents of RAM over and over again without having any adverse effect on the RAM hardware. Flash ROM on the other hand, stops working after so many writes. The concern is that, by moving storage into flash, we’re going to substantially shorten the life of our PocketPCs.
I have a few answers to this. (Sorry for the bulleted list. The paragraph was getting too dense.)
All that said, there is a limit to how many times you can write to flash. And power users might find ways to hit the limit in the lifetimes of their devices. One poster was going to thousands of web pages every day and was concerned that the temporary internet files he was downloading (pictures and things) would eventually destroy the flash. PIE does store its cache in flash, and it doesn't do enough buffering to protect you if you're hitting that many unique pages every day.
If you're worried, there are a few things you can do. Note these are total power user things. I don't expect a typical user to need to do this. I certainly don't do this on my devices, and I live by them.
One thing you could do is disable the cache. This will result in needing to re-download pictures and things when you go back to web pages, but will keep them from beating up your flash. To do this, use a registry editor to go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content and set the "CacheLimit" value to 0.
The second idea is to install a RamDisk and move Temporary Internet Files to it. I'm going to need to get back with you on specifics of how to do that. I need to do my homework first.
What should a developer do?There was a post asking if we do anything to protect developers from beating up the cache. In general, the answer is no. The filesystem does buffer a flash block's worth of data before writing it, but in general, things look the same to a developer as they did when data was store in RAM. This is two edged. It means that old apps will continue to work, but it also means that apps which assume RAM characteristics might not work well (or might damage your flash if they're particularly bad). As a developer, if you have a choice between opening a file, writing a bunch of data to it, and closing it vs. opening a file, writing a tiny bit of data to it, closing it, and then opening it again for the next tiny bit of data, you're better off with the former. Buffering your data and writing it all at once is the way to go.
I've got a lot more questions to answer. I'll get to them in part 2, hopefully later on today.
Mike Calligaro