heyLu / chrome-newtab-notes

Change the chromium newtab page to a localStorage/gist-based notepad
0 stars 0 forks source link

Optimize storing the current note #6

Closed heyLu closed 11 years ago

heyLu commented 11 years ago

Currently, it is stored every 0.5 seconds to ensure that no work is lost, even if closing a tab abruptly (e.g. when the browser crashes).

This is really not required, at least a check could be added whether the note changed. As an experiment it would also be interesting to detect 'focused' state and only save then.

Then most fun/advanced version would be to save on keystrokes, but delayed so that it saves immediately after you stop typing. This might not work, though, for example when writing and then not stop typing but closing the window immediately.

Also related, we could also save remotely triggered after not typing for a while, but this could lead to issues when syncing is not automatic.