Skip to content
This repository was archived by the owner on Sep 9, 2022. It is now read-only.

Need a stale page store janitor: found entries with no tab counterparts #455

Closed
gorhill opened this issue Jan 1, 2015 · 1 comment
Closed

Comments

@gorhill
Copy link
Contributor

gorhill commented Jan 1, 2015

I suspect this might be caused by the browser's "Predict network actions to improve page load performance" setting. I suspect the browser may create/dispose of tabs internally which are never really rendered and thus never go through the chrome.tabs.onRemoved event, and as a consequence never removed from memory.

At this point the simplest way to address the issue is to have a janitor which find and dispose of stale page store entries.

@gorhill
Copy link
Contributor Author

gorhill commented Jan 2, 2015

Ok, confirmed, if "Predict network actions to improve page load performance" is enabled, this will causes stale page store entries when searching a term in the search bar.

  1. Have "Predict network actions to improve page load performance" enabled
  2. Open new tab
  3. Enter "allo" in address bar
  4. Close tab
  5. Open extension's background page and enter µBlock.pageStores in console
  6. Result: there is a page store entry for http://www.allo.com/

It appears Chromium will automatically load the first link of result in an off-screen tab, which will never receive a tabs.onRemove() event, and as a consequence the page store entry (and all associated data structures) will occupy memory needlessly forever.

Need to fix ASAP, as I suspect that most users do not disable the "Predict network actions..." setting (I personally think everybody should disable it).

@gorhill gorhill closed this as completed in 0099599 Jan 2, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant