commit c7d1ac2d6a59a01906277e9c25d17fcf896aa22b Author: Michael Catanzaro Date: Fri Apr 8 09:19:47 2016 -0500 Prepare 3.18.6 NEWS | 6 ++++++ configure.ac | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 51d8d547b0260271ac342b350cde3c145e66dc5f Author: Michael Catanzaro Date: Tue Mar 29 20:59:31 2016 -0500 snapshot-service: Take new snapshots after a restart The previous commit was correct, but the commit message was not. It stated that removing the erroneous check would cause snapshots to be taken if the stored snapshot is too old. In fact, removing the check did not affect behavior at all -- the check was useless -- and so that did nothing to fix our stale snapshot issue. If the snapshot path is not in memory cache, this is an indication that the snapshot is relatively stale (older than the current browsing session) and should be taken again. But we cannot use the existing snapshot path memory cache as-is, because it is populated not when snapshots are taken, but when snapshots are looked up. Augment the cache to remember which paths were snapshotted since Epiphany was last restarted, and check it to determine whether we're due for a snapshot of the current page. Also, remove use of the cache from EphyWebView, since that would prevent snapshots from ever being taken. This really fixes the issue. https://bugzilla.gnome.org/show_bug.cgi?id=763184 embed/ephy-web-view.c | 19 +++---- lib/ephy-snapshot-service.c | 117 +++++++++++++++++++++++++++++--------------- 2 files changed, 84 insertions(+), 52 deletions(-) commit a7d18ede51470965cd6af2a94d3787af934a4904 Author: Michael Catanzaro Date: Tue Mar 29 20:12:09 2016 -0500 Revert "snapshot-service: Update snapshots after one week" This reverts commit 80ba0ff169d472888389589b143407d56898ea62. This code has been broken since it was introduced. There are two cases where we use the snapshot service: * From EphyAboutHandler. Here we pass the a time taken from EphyHistoryService for the mtime. This check does not seem useful in this case, because it is only a query: it can never result in a new snapshot being taken to replace the old snapshot. * From EphyWebView itself, when a new page is loaded (or, until recently, when a favicon was acquired for that page). This is the only case in which a new snapshot can ever be taken (or updated). In this case, we pass the current time for mtime, then the comparison current_time - mtime <= SNAPSHOT_UPDATE_THRESHOLD is the same as if (0 <= SNAPSHOT_UPDATE_THRESHOLD), and so the snapshots always pass the check and are never expired. Ideally we would reimplement this properly, since one week seems like a good amount of time for which to persist snapshots. But this is far from straightforward to do. For now, let's just remove this code, causing snapshots to be updated at most once per browsing session. This mitigates the bug where, until recently, we would take snapshots of completely white web views, before the pages had rendered; even though we no longer take white snapshots, broken snapshots that were taken previously currently persist forever until ~/.cache/thumbnails is cleared somehow (e.g. by gnome-settings-daemon's housekeeping plugin). Now they will be cleared much sooner. https://bugzilla.gnome.org/show_bug.cgi?id=763184 lib/ephy-snapshot-service.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)