Closed Bug 1102975 Opened 7 years ago Closed 7 years ago

Add a pref to control the content viewer expiration time in bfcache

Categories

(Core :: DOM: Navigation, defect)

36 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: smaug, Assigned: smaug)

Details

Attachments

(2 files)

Currently the timeout is hardcoded, and it means bfcache entries are dropped in 20~30mins
(expiration tracker is based on generations so the time isn't very accurate, given that only 3 generations are used in this case).
I think b2g and Mobile could use some significantly lower value, like 6-9mins, or maybe even
4-6mins.

Patch coming
Attached patch v1Splinter Review
https://tbpl.mozilla.org/?tree=Try&rev=585192fd3ea6

Keep the old default, but add browser.sessionhistory.contentViewerTimeout pref
to override it and use 360 for its value on mobile and b2g.

This will lead us to evict bfcache entries in couple of minutes, instead of tens of minutes.
Attachment #8526903 - Flags: review?(khuey)
Comment on attachment 8526903 [details] [diff] [review]
v1

Review of attachment 8526903 [details] [diff] [review]:
-----------------------------------------------------------------

::: docshell/shistory/src/nsSHEntryShared.cpp
@@ +33,5 @@
>  
>  typedef nsExpirationTracker<nsSHEntryShared, 3> HistoryTrackerBase;
>  class HistoryTracker MOZ_FINAL : public HistoryTrackerBase {
>  public:
> +  HistoryTracker(uint32_t aTimeout) 

white space at EOL

@@ +39,3 @@
>    {
>    }
>    

here too

@@ +53,4 @@
>  {
> +  if (!gHistoryTracker) {
> +    // nsExpirationTracker doesn't let one to change timer period, so just set
> +    // it once when history tracker is first time used.

doesn't allow one to change the timer period ... when the history tracker is used for the first time
Attachment #8526903 - Flags: review?(khuey) → review+
Attached patch +commentsSplinter Review
https://hg.mozilla.org/mozilla-central/rev/16918e67d582
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.