mozilla / contain-facebook

Facebook Container isolates your Facebook activity from the rest of your web activity in order to prevent Facebook from tracking you outside of the Facebook website via third party cookies.
Mozilla Public License 2.0
968 stars 176 forks source link

Guardian crossword: container adds up to 800ms latency on every click #542

Open stestagg opened 4 years ago

stestagg commented 4 years ago

Amazon.co.uk 1.1 true amazon@search.mozilla.org Bing 1.0 true bing@search.mozilla.org Chambers (UK) 1.0 true chambers-en-GB@search.mozilla.org DuckDuckGo 1.0 true ddg@search.mozilla.org eBay 1.0 true ebay@search.mozilla.org Facebook Container 2.0.3 true @contain-facebook Google 1.0 true google@search.mozilla.org Google Container 1.5.0 true @contain-google LastPass: Free Password Manager 4.36.0.1 true support@lastpass.com Twitter 1.0 true twitter@search.mozilla.org uBlock Origin 1.23.0 true uBlock0@raymondhill.net Wikipedia (en) 1.0 true wikipedia@search.mozilla.org

Actual behavior

Hi, the Guardian crossword page seems to do some fairly funky stuff behind the scenes, there's always more latency on the page than one would expect, but the facebook container addon seems to be particularly adversely affected, adding significant latency to every cell selection.

Examples taken from: https://www.theguardian.com/crosswords/quick/15441

In following screenshot, 4 different cells were clicked in succession: image

Zooming on the second click only show the majority of time being spent in what looks like the facebook addon (Red circle), what's interesting is that the blue circle outlines what looks like the lastpass dom detection script running too. Something about how the DOM is being updated seems to be triggering these operations on every cell selection:

image

Expected behavior

With the facebook container addon disabled, the latency is much improved (same page, 4 cells clicked): image

with each click looking like: image

Steps to reproduce

  1. navigate to https://www.theguardian.com/crosswords/quick/15441 with facebook container enabled
  2. select different cells in the grid
  3. notice latency in UI updating & hangs
maxxcrawford commented 4 years ago

This is still reproducible in the latest version. That latency is very short, but still persistent.