Skip to content

Loading…

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

Closed
gorhill opened this Issue · 1 comment

1 participant

@gorhill

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

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 added a commit that closed this issue
@gorhill gorhill this fixes #455 0099599
@gorhill gorhill closed this in 0099599
@AlexVallat AlexVallat pushed a commit to AlexVallat/uBlock that referenced this issue
@gorhill gorhill this fixes #455 (regression) 969e533
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.