What is the best practice for file writing
<p>I am writing a little note pad app, where users can enter text notes, which are saved to the file system.</p>

<p>I am wondering what is the right balance between persistence and battery life (in terms of frequent I/O)</p>

<p>I want to ensure that a user will experience minimal loss in the event of a power outage. 
That requirement suggests that a flush to the file system should be performed after every few characters are typed (using some throttling)</p>

<p>On the other hand, that strategy would use too much battery.</p>

<p>So what should be the right blend of durability and performance?</p>
