-
Will Wang authored
This patch includes: - (By Yoric) Don't collect/save the session when the user is idle;r=mdeboer - Add a test for the behavior of state writing in idle/active mode When the user is not actively using the computer, webpages may still perform changes that require (re)writing to sessionstore, e.g. updating Session Cookies or DOM Session Storage, or refreshing, etc. Before this patch, a single active page can require us to recollect/serialize/write the entire Session Restore file every 15 seconds even when the user is not in front of the computer. We expect that, when the user is not in front of the computer, changes are not critical and don't need to be saved as often. We now adopt the following strategy: - when the user has been away for (by default) 15 seconds, finish any pending collect/write, then increase the collect/write buffering delay to (by default) 1h - when the user returns, reschedule any pending 1h collect/write as a (by default) 15 seconds collect/write, then proceed with (by default) 15 seconds collect/write delays. --HG-- extra : histedit_source : b7ea6a6fbfee2f3a2bddeaa69b6446d7544c2585
9ab097c6