Closed
Bug 666340
Opened 14 years ago
Closed 6 years ago
Serialize the memory cache on shutdown
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: cwiiis, Unassigned)
Details
(Keywords: perf)
Attachments
(3 files, 3 obsolete files)
15.55 KB,
patch
|
Details | Diff | Splinter Review | |
1.19 KB,
patch
|
Details | Diff | Splinter Review | |
4.03 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0a1) Gecko/20110622 Firefox/7.0a1
Build Identifier:
We can probably reduce page-load time and bandwidth use slightly if we serialize the memory cache on shut-down, and deserialize it on startup. This ought to help with restart speed to, when restoring tabs.
This may work quite nicely in addition to a disk cache (bug #645848).
Reproducible: Always
Reporter | ||
Comment 1•14 years ago
|
||
This patch serializes the memory cache on memory-pressure and on shutdown, and deserializes when initialising the session store (which happens before restoring the session).
Probably not really ready for review yet.
Reporter | ||
Comment 2•14 years ago
|
||
Just a note, this doesn't seem hugely effective unless you increase the memory cache size (browser.cache.memory.capacity) - I find 4 megs seems to give more reasonable results (the default is 1).
Perhaps we could have a more intelligent eviction algorithm? (I notice in my cache that a lot of ads and ad-related content gets cached vs. main page resources)
![]() |
||
Comment 3•14 years ago
|
||
(In reply to comment #2)
> Perhaps we could have a more intelligent eviction algorithm? (I notice in my
> cache that a lot of ads and ad-related content gets cached vs. main page
> resources)
Be aware of bug 661900 -- this *might* be contributing to your eviction problem.
Reporter | ||
Comment 4•14 years ago
|
||
Updated patch.
This version also uses the browser.cache.check_doc_frequency pref when restoring the last session to (hopefully) stop from verifying cache entries. The pref is reset once the page has finished loading or is stopped.
Not sure if this is a good idea or not, ideally there'd be a way to do what this pref does on a per-tab basis.
Attachment #541155 -
Attachment is obsolete: true
Reporter | ||
Comment 5•14 years ago
|
||
This patch adds an extra startup option that allows you to restore the last session. Probably not that desirable on a phone perhaps, but I like this option on a tablet.
Reporter | ||
Comment 6•14 years ago
|
||
Reporter | ||
Comment 7•14 years ago
|
||
This patch tweaks the serialization slightly to take advantage of the cache compression provided in bug #648429.
Attachment #541966 -
Attachment is obsolete: true
Updated•14 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•14 years ago
|
Assignee: nobody → chrislord.net
Reporter | ||
Comment 8•14 years ago
|
||
Whoops, the optional session restore didn't work because the preference wasn't added by default.
Attachment #541964 -
Attachment is obsolete: true
Reporter | ||
Comment 9•14 years ago
|
||
Just to note, it's only the first hunk of that patch that's relevant to this, you could just apply that and ignore the rest.
Reporter | ||
Comment 10•14 years ago
|
||
ugh, ignore last comment, wrong bug.
Reporter | ||
Comment 11•14 years ago
|
||
Just checking back on this, is memory cache serialization something we want? Our default memory cache size is only 1meg, so it barely helps in that situation, but coupled with an increased size of 4 megs and perhaps memory cache compression, you might be looking at saving some precious bandwidth.
It has no considerable effect on loading times, as far as I can see, in practical situations at least, so I think this should be considered purely on its saving-bandwidth potential (at the expense of storage space).
I think this would also be superseded by the work on getting disk cache usable on mobile too.
Thoughts?
Reporter | ||
Comment 12•13 years ago
|
||
I don't think I'm the right person to be dealing with this, unassigning.
Assignee: chrislord.net → nobody
Comment 13•6 years ago
|
||
Closing all opened bug in a graveyard component
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•