addons-frontend
addons-frontend copied to clipboard
Remove unused parts of `redux-store-state`
I've noticed that the size of the JSON can get quite large on some pages. On https://addons.mozilla.org/en-GB/firefox/ right now, document.getElementById('redux-store-state').innerText.length returns 177619. That is quite a lot :)
One obvious candidate I've found is the list of domains that addons want permissions for. I haven't seen that data used on the website so maybe it can be kept out of the store?
Expand to see Privacy Badger's permissions
"permissions": [
"tabs",
"http:\u002F\u002F*\u002F*",
"https:\u002F\u002F*\u002F*",
"webNavigation",
"webRequest",
"webRequestBlocking",
"storage",
"cookies",
"privacy",
"https:\u002F\u002F*.facebook.com\u002F*",
"http:\u002F\u002F*.facebook.com\u002F*",
"https:\u002F\u002F*.messenger.com\u002F*",
"http:\u002F\u002F*.messenger.com\u002F*",
"*:\u002F\u002F*.facebookcorewwwi.onion\u002F*",
"https:\u002F\u002Fwww.google.com\u002F*",
"http:\u002F\u002Fwww.google.com\u002F*",
"https:\u002F\u002Fwww.google.ad\u002F*",
"http:\u002F\u002Fwww.google.ad\u002F*",
"https:\u002F\u002Fwww.google.ae\u002F*",
"http:\u002F\u002Fwww.google.ae\u002F*",
"https:\u002F\u002Fwww.google.com.af\u002F*",
"http:\u002F\u002Fwww.google.com.af\u002F*",
"https:\u002F\u002Fwww.google.com.ag\u002F*",
"http:\u002F\u002Fwww.google.com.ag\u002F*",
"https:\u002F\u002Fwww.google.com.ai\u002F*",
"http:\u002F\u002Fwww.google.com.ai\u002F*",
"https:\u002F\u002Fwww.google.al\u002F*",
"http:\u002F\u002Fwww.google.al\u002F*",
"https:\u002F\u002Fwww.google.am\u002F*",
"http:\u002F\u002Fwww.google.am\u002F*",
"https:\u002F\u002Fwww.google.co.ao\u002F*",
"http:\u002F\u002Fwww.google.co.ao\u002F*",
"https:\u002F\u002Fwww.google.com.ar\u002F*",
"http:\u002F\u002Fwww.google.com.ar\u002F*",
"https:\u002F\u002Fwww.google.as\u002F*",
"http:\u002F\u002Fwww.google.as\u002F*",
"https:\u002F\u002Fwww.google.at\u002F*",
"http:\u002F\u002Fwww.google.at\u002F*",
"https:\u002F\u002Fwww.google.com.au\u002F*",
"http:\u002F\u002Fwww.google.com.au\u002F*",
"https:\u002F\u002Fwww.google.az\u002F*",
"http:\u002F\u002Fwww.google.az\u002F*",
"https:\u002F\u002Fwww.google.ba\u002F*",
"http:\u002F\u002Fwww.google.ba\u002F*",
"https:\u002F\u002Fwww.google.com.bd\u002F*",
"http:\u002F\u002Fwww.google.com.bd\u002F*",
"https:\u002F\u002Fwww.google.be\u002F*",
"http:\u002F\u002Fwww.google.be\u002F*",
"https:\u002F\u002Fwww.google.bf\u002F*",
"http:\u002F\u002Fwww.google.bf\u002F*",
"https:\u002F\u002Fwww.google.bg\u002F*",
"http:\u002F\u002Fwww.google.bg\u002F*",
"https:\u002F\u002Fwww.google.com.bh\u002F*",
"http:\u002F\u002Fwww.google.com.bh\u002F*",
"https:\u002F\u002Fwww.google.bi\u002F*",
"http:\u002F\u002Fwww.google.bi\u002F*",
"https:\u002F\u002Fwww.google.bj\u002F*",
"http:\u002F\u002Fwww.google.bj\u002F*",
"https:\u002F\u002Fwww.google.com.bn\u002F*",
"http:\u002F\u002Fwww.google.com.bn\u002F*",
"https:\u002F\u002Fwww.google.com.bo\u002F*",
"http:\u002F\u002Fwww.google.com.bo\u002F*",
"https:\u002F\u002Fwww.google.com.br\u002F*",
"http:\u002F\u002Fwww.google.com.br\u002F*",
"https:\u002F\u002Fwww.google.bs\u002F*",
"http:\u002F\u002Fwww.google.bs\u002F*",
"https:\u002F\u002Fwww.google.bt\u002F*",
"http:\u002F\u002Fwww.google.bt\u002F*",
"https:\u002F\u002Fwww.google.co.bw\u002F*",
"http:\u002F\u002Fwww.google.co.bw\u002F*",
"https:\u002F\u002Fwww.google.by\u002F*",
"http:\u002F\u002Fwww.google.by\u002F*",
"https:\u002F\u002Fwww.google.com.bz\u002F*",
"http:\u002F\u002Fwww.google.com.bz\u002F*",
"https:\u002F\u002Fwww.google.ca\u002F*",
"http:\u002F\u002Fwww.google.ca\u002F*",
"https:\u002F\u002Fwww.google.cd\u002F*",
"http:\u002F\u002Fwww.google.cd\u002F*",
"https:\u002F\u002Fwww.google.cf\u002F*",
"http:\u002F\u002Fwww.google.cf\u002F*",
"https:\u002F\u002Fwww.google.cg\u002F*",
"http:\u002F\u002Fwww.google.cg\u002F*",
"https:\u002F\u002Fwww.google.ch\u002F*",
"http:\u002F\u002Fwww.google.ch\u002F*",
"https:\u002F\u002Fwww.google.ci\u002F*",
"http:\u002F\u002Fwww.google.ci\u002F*",
"https:\u002F\u002Fwww.google.co.ck\u002F*",
"http:\u002F\u002Fwww.google.co.ck\u002F*",
"https:\u002F\u002Fwww.google.cl\u002F*",
"http:\u002F\u002Fwww.google.cl\u002F*",
"https:\u002F\u002Fwww.google.cm\u002F*",
"http:\u002F\u002Fwww.google.cm\u002F*",
"https:\u002F\u002Fwww.google.cn\u002F*",
"http:\u002F\u002Fwww.google.cn\u002F*",
"https:\u002F\u002Fwww.google.com.co\u002F*",
"http:\u002F\u002Fwww.google.com.co\u002F*",
"https:\u002F\u002Fwww.google.co.cr\u002F*",
"http:\u002F\u002Fwww.google.co.cr\u002F*",
"https:\u002F\u002Fwww.google.com.cu\u002F*",
"http:\u002F\u002Fwww.google.com.cu\u002F*",
"https:\u002F\u002Fwww.google.cv\u002F*",
"http:\u002F\u002Fwww.google.cv\u002F*",
"https:\u002F\u002Fwww.google.com.cy\u002F*",
"http:\u002F\u002Fwww.google.com.cy\u002F*",
"https:\u002F\u002Fwww.google.cz\u002F*",
"http:\u002F\u002Fwww.google.cz\u002F*",
"https:\u002F\u002Fwww.google.de\u002F*",
"http:\u002F\u002Fwww.google.de\u002F*",
"https:\u002F\u002Fwww.google.dj\u002F*",
"http:\u002F\u002Fwww.google.dj\u002F*",
"https:\u002F\u002Fwww.google.dk\u002F*",
"http:\u002F\u002Fwww.google.dk\u002F*",
"https:\u002F\u002Fwww.google.dm\u002F*",
"http:\u002F\u002Fwww.google.dm\u002F*",
"https:\u002F\u002Fwww.google.com.do\u002F*",
"http:\u002F\u002Fwww.google.com.do\u002F*",
"https:\u002F\u002Fwww.google.dz\u002F*",
"http:\u002F\u002Fwww.google.dz\u002F*",
"https:\u002F\u002Fwww.google.com.ec\u002F*",
"http:\u002F\u002Fwww.google.com.ec\u002F*",
"https:\u002F\u002Fwww.google.ee\u002F*",
"http:\u002F\u002Fwww.google.ee\u002F*",
"https:\u002F\u002Fwww.google.com.eg\u002F*",
"http:\u002F\u002Fwww.google.com.eg\u002F*",
"https:\u002F\u002Fwww.google.es\u002F*",
"http:\u002F\u002Fwww.google.es\u002F*",
"https:\u002F\u002Fwww.google.com.et\u002F*",
"http:\u002F\u002Fwww.google.com.et\u002F*",
"https:\u002F\u002Fwww.google.fi\u002F*",
"http:\u002F\u002Fwww.google.fi\u002F*",
"https:\u002F\u002Fwww.google.com.fj\u002F*",
"http:\u002F\u002Fwww.google.com.fj\u002F*",
"https:\u002F\u002Fwww.google.fm\u002F*",
"http:\u002F\u002Fwww.google.fm\u002F*",
"https:\u002F\u002Fwww.google.fr\u002F*",
"http:\u002F\u002Fwww.google.fr\u002F*",
"https:\u002F\u002Fwww.google.ga\u002F*",
"http:\u002F\u002Fwww.google.ga\u002F*",
"https:\u002F\u002Fwww.google.ge\u002F*",
"http:\u002F\u002Fwww.google.ge\u002F*",
"https:\u002F\u002Fwww.google.gg\u002F*",
"http:\u002F\u002Fwww.google.gg\u002F*",
"https:\u002F\u002Fwww.google.com.gh\u002F*",
"http:\u002F\u002Fwww.google.com.gh\u002F*",
"https:\u002F\u002Fwww.google.com.gi\u002F*",
"http:\u002F\u002Fwww.google.com.gi\u002F*",
"https:\u002F\u002Fwww.google.gl\u002F*",
"http:\u002F\u002Fwww.google.gl\u002F*",
"https:\u002F\u002Fwww.google.gm\u002F*",
"http:\u002F\u002Fwww.google.gm\u002F*",
"https:\u002F\u002Fwww.google.gr\u002F*",
"http:\u002F\u002Fwww.google.gr\u002F*",
"https:\u002F\u002Fwww.google.com.gt\u002F*",
"http:\u002F\u002Fwww.google.com.gt\u002F*",
"https:\u002F\u002Fwww.google.gy\u002F*",
"http:\u002F\u002Fwww.google.gy\u002F*",
"https:\u002F\u002Fwww.google.com.hk\u002F*",
"http:\u002F\u002Fwww.google.com.hk\u002F*",
"https:\u002F\u002Fwww.google.hn\u002F*",
"http:\u002F\u002Fwww.google.hn\u002F*",
"https:\u002F\u002Fwww.google.hr\u002F*",
"http:\u002F\u002Fwww.google.hr\u002F*",
"https:\u002F\u002Fwww.google.ht\u002F*",
"http:\u002F\u002Fwww.google.ht\u002F*",
"https:\u002F\u002Fwww.google.hu\u002F*",
"http:\u002F\u002Fwww.google.hu\u002F*",
"https:\u002F\u002Fwww.google.co.id\u002F*",
"http:\u002F\u002Fwww.google.co.id\u002F*",
"https:\u002F\u002Fwww.google.ie\u002F*",
"http:\u002F\u002Fwww.google.ie\u002F*",
"https:\u002F\u002Fwww.google.co.il\u002F*",
"http:\u002F\u002Fwww.google.co.il\u002F*",
"https:\u002F\u002Fwww.google.im\u002F*",
"http:\u002F\u002Fwww.google.im\u002F*",
"https:\u002F\u002Fwww.google.co.in\u002F*",
"http:\u002F\u002Fwww.google.co.in\u002F*",
"https:\u002F\u002Fwww.google.iq\u002F*",
"http:\u002F\u002Fwww.google.iq\u002F*",
"https:\u002F\u002Fwww.google.is\u002F*",
"http:\u002F\u002Fwww.google.is\u002F*",
"https:\u002F\u002Fwww.google.it\u002F*",
"http:\u002F\u002Fwww.google.it\u002F*",
"https:\u002F\u002Fwww.google.je\u002F*",
"http:\u002F\u002Fwww.google.je\u002F*",
"https:\u002F\u002Fwww.google.com.jm\u002F*",
"http:\u002F\u002Fwww.google.com.jm\u002F*",
"https:\u002F\u002Fwww.google.jo\u002F*",
"http:\u002F\u002Fwww.google.jo\u002F*",
"https:\u002F\u002Fwww.google.co.jp\u002F*",
"http:\u002F\u002Fwww.google.co.jp\u002F*",
"https:\u002F\u002Fwww.google.co.ke\u002F*",
"http:\u002F\u002Fwww.google.co.ke\u002F*",
"https:\u002F\u002Fwww.google.com.kh\u002F*",
"http:\u002F\u002Fwww.google.com.kh\u002F*",
"https:\u002F\u002Fwww.google.ki\u002F*",
"http:\u002F\u002Fwww.google.ki\u002F*",
"https:\u002F\u002Fwww.google.kg\u002F*",
"http:\u002F\u002Fwww.google.kg\u002F*",
"https:\u002F\u002Fwww.google.co.kr\u002F*",
"http:\u002F\u002Fwww.google.co.kr\u002F*",
"https:\u002F\u002Fwww.google.com.kw\u002F*",
"http:\u002F\u002Fwww.google.com.kw\u002F*",
"https:\u002F\u002Fwww.google.kz\u002F*",
"http:\u002F\u002Fwww.google.kz\u002F*",
"https:\u002F\u002Fwww.google.la\u002F*",
"http:\u002F\u002Fwww.google.la\u002F*",
"https:\u002F\u002Fwww.google.com.lb\u002F*",
"http:\u002F\u002Fwww.google.com.lb\u002F*",
"https:\u002F\u002Fwww.google.li\u002F*",
"http:\u002F\u002Fwww.google.li\u002F*",
"https:\u002F\u002Fwww.google.lk\u002F*",
"http:\u002F\u002Fwww.google.lk\u002F*",
"https:\u002F\u002Fwww.google.co.ls\u002F*",
"http:\u002F\u002Fwww.google.co.ls\u002F*",
"https:\u002F\u002Fwww.google.lt\u002F*",
"http:\u002F\u002Fwww.google.lt\u002F*",
"https:\u002F\u002Fwww.google.lu\u002F*",
"http:\u002F\u002Fwww.google.lu\u002F*",
"https:\u002F\u002Fwww.google.lv\u002F*",
"http:\u002F\u002Fwww.google.lv\u002F*",
"https:\u002F\u002Fwww.google.com.ly\u002F*",
"http:\u002F\u002Fwww.google.com.ly\u002F*",
"https:\u002F\u002Fwww.google.co.ma\u002F*",
"http:\u002F\u002Fwww.google.co.ma\u002F*",
"https:\u002F\u002Fwww.google.md\u002F*",
"http:\u002F\u002Fwww.google.md\u002F*",
"https:\u002F\u002Fwww.google.me\u002F*",
"http:\u002F\u002Fwww.google.me\u002F*",
"https:\u002F\u002Fwww.google.mg\u002F*",
"http:\u002F\u002Fwww.google.mg\u002F*",
"https:\u002F\u002Fwww.google.mk\u002F*",
"http:\u002F\u002Fwww.google.mk\u002F*",
"https:\u002F\u002Fwww.google.ml\u002F*",
"http:\u002F\u002Fwww.google.ml\u002F*",
"https:\u002F\u002Fwww.google.com.mm\u002F*",
"http:\u002F\u002Fwww.google.com.mm\u002F*",
"https:\u002F\u002Fwww.google.mn\u002F*",
"http:\u002F\u002Fwww.google.mn\u002F*",
"https:\u002F\u002Fwww.google.ms\u002F*",
"http:\u002F\u002Fwww.google.ms\u002F*",
"https:\u002F\u002Fwww.google.com.mt\u002F*",
"http:\u002F\u002Fwww.google.com.mt\u002F*",
"https:\u002F\u002Fwww.google.mu\u002F*",
"http:\u002F\u002Fwww.google.mu\u002F*",
"https:\u002F\u002Fwww.google.mv\u002F*",
"http:\u002F\u002Fwww.google.mv\u002F*",
"https:\u002F\u002Fwww.google.mw\u002F*",
"http:\u002F\u002Fwww.google.mw\u002F*",
"https:\u002F\u002Fwww.google.com.mx\u002F*",
"http:\u002F\u002Fwww.google.com.mx\u002F*",
"https:\u002F\u002Fwww.google.com.my\u002F*",
"http:\u002F\u002Fwww.google.com.my\u002F*",
"https:\u002F\u002Fwww.google.co.mz\u002F*",
"http:\u002F\u002Fwww.google.co.mz\u002F*",
"https:\u002F\u002Fwww.google.com.na\u002F*",
"http:\u002F\u002Fwww.google.com.na\u002F*",
"https:\u002F\u002Fwww.google.com.ng\u002F*",
"http:\u002F\u002Fwww.google.com.ng\u002F*",
"https:\u002F\u002Fwww.google.com.ni\u002F*",
"http:\u002F\u002Fwww.google.com.ni\u002F*",
"https:\u002F\u002Fwww.google.ne\u002F*",
"http:\u002F\u002Fwww.google.ne\u002F*",
"https:\u002F\u002Fwww.google.nl\u002F*",
"http:\u002F\u002Fwww.google.nl\u002F*",
"https:\u002F\u002Fwww.google.no\u002F*",
"http:\u002F\u002Fwww.google.no\u002F*",
"https:\u002F\u002Fwww.google.com.np\u002F*",
"http:\u002F\u002Fwww.google.com.np\u002F*",
"https:\u002F\u002Fwww.google.nr\u002F*",
"http:\u002F\u002Fwww.google.nr\u002F*",
"https:\u002F\u002Fwww.google.nu\u002F*",
"http:\u002F\u002Fwww.google.nu\u002F*",
"https:\u002F\u002Fwww.google.co.nz\u002F*",
"http:\u002F\u002Fwww.google.co.nz\u002F*",
"https:\u002F\u002Fwww.google.com.om\u002F*",
"http:\u002F\u002Fwww.google.com.om\u002F*",
"https:\u002F\u002Fwww.google.com.pa\u002F*",
"http:\u002F\u002Fwww.google.com.pa\u002F*",
"https:\u002F\u002Fwww.google.com.pe\u002F*",
"http:\u002F\u002Fwww.google.com.pe\u002F*",
"https:\u002F\u002Fwww.google.com.pg\u002F*",
"http:\u002F\u002Fwww.google.com.pg\u002F*",
"https:\u002F\u002Fwww.google.com.ph\u002F*",
"http:\u002F\u002Fwww.google.com.ph\u002F*",
"https:\u002F\u002Fwww.google.com.pk\u002F*",
"http:\u002F\u002Fwww.google.com.pk\u002F*",
"https:\u002F\u002Fwww.google.pl\u002F*",
"http:\u002F\u002Fwww.google.pl\u002F*",
"https:\u002F\u002Fwww.google.pn\u002F*",
"http:\u002F\u002Fwww.google.pn\u002F*",
"https:\u002F\u002Fwww.google.com.pr\u002F*",
"http:\u002F\u002Fwww.google.com.pr\u002F*",
"https:\u002F\u002Fwww.google.ps\u002F*",
"http:\u002F\u002Fwww.google.ps\u002F*",
"https:\u002F\u002Fwww.google.pt\u002F*",
"http:\u002F\u002Fwww.google.pt\u002F*",
"https:\u002F\u002Fwww.google.com.py\u002F*",
"http:\u002F\u002Fwww.google.com.py\u002F*",
"https:\u002F\u002Fwww.google.com.qa\u002F*",
"http:\u002F\u002Fwww.google.com.qa\u002F*",
"https:\u002F\u002Fwww.google.ro\u002F*",
"http:\u002F\u002Fwww.google.ro\u002F*",
"https:\u002F\u002Fwww.google.ru\u002F*",
"http:\u002F\u002Fwww.google.ru\u002F*",
"https:\u002F\u002Fwww.google.rw\u002F*",
"http:\u002F\u002Fwww.google.rw\u002F*",
"https:\u002F\u002Fwww.google.com.sa\u002F*",
"http:\u002F\u002Fwww.google.com.sa\u002F*",
"https:\u002F\u002Fwww.google.com.sb\u002F*",
"http:\u002F\u002Fwww.google.com.sb\u002F*",
"https:\u002F\u002Fwww.google.sc\u002F*",
"http:\u002F\u002Fwww.google.sc\u002F*",
"https:\u002F\u002Fwww.google.se\u002F*",
"http:\u002F\u002Fwww.google.se\u002F*",
"https:\u002F\u002Fwww.google.com.sg\u002F*",
"http:\u002F\u002Fwww.google.com.sg\u002F*",
"https:\u002F\u002Fwww.google.sh\u002F*",
"http:\u002F\u002Fwww.google.sh\u002F*",
"https:\u002F\u002Fwww.google.si\u002F*",
"http:\u002F\u002Fwww.google.si\u002F*",
"https:\u002F\u002Fwww.google.sk\u002F*",
"http:\u002F\u002Fwww.google.sk\u002F*",
"https:\u002F\u002Fwww.google.com.sl\u002F*",
"http:\u002F\u002Fwww.google.com.sl\u002F*",
"https:\u002F\u002Fwww.google.sn\u002F*",
"http:\u002F\u002Fwww.google.sn\u002F*",
"https:\u002F\u002Fwww.google.so\u002F*",
"http:\u002F\u002Fwww.google.so\u002F*",
"https:\u002F\u002Fwww.google.sm\u002F*",
"http:\u002F\u002Fwww.google.sm\u002F*",
"https:\u002F\u002Fwww.google.sr\u002F*",
"http:\u002F\u002Fwww.google.sr\u002F*",
"https:\u002F\u002Fwww.google.st\u002F*",
"http:\u002F\u002Fwww.google.st\u002F*",
"https:\u002F\u002Fwww.google.com.sv\u002F*",
"http:\u002F\u002Fwww.google.com.sv\u002F*",
"https:\u002F\u002Fwww.google.td\u002F*",
"http:\u002F\u002Fwww.google.td\u002F*",
"https:\u002F\u002Fwww.google.tg\u002F*",
"http:\u002F\u002Fwww.google.tg\u002F*",
"https:\u002F\u002Fwww.google.co.th\u002F*",
"http:\u002F\u002Fwww.google.co.th\u002F*",
"https:\u002F\u002Fwww.google.com.tj\u002F*",
"http:\u002F\u002Fwww.google.com.tj\u002F*",
"https:\u002F\u002Fwww.google.tl\u002F*",
"http:\u002F\u002Fwww.google.tl\u002F*",
"https:\u002F\u002Fwww.google.tm\u002F*",
"http:\u002F\u002Fwww.google.tm\u002F*",
"https:\u002F\u002Fwww.google.tn\u002F*",
"http:\u002F\u002Fwww.google.tn\u002F*",
"https:\u002F\u002Fwww.google.to\u002F*",
"http:\u002F\u002Fwww.google.to\u002F*",
"https:\u002F\u002Fwww.google.com.tr\u002F*",
"http:\u002F\u002Fwww.google.com.tr\u002F*",
"https:\u002F\u002Fwww.google.tt\u002F*",
"http:\u002F\u002Fwww.google.tt\u002F*",
"https:\u002F\u002Fwww.google.com.tw\u002F*",
"http:\u002F\u002Fwww.google.com.tw\u002F*",
"https:\u002F\u002Fwww.google.co.tz\u002F*",
"http:\u002F\u002Fwww.google.co.tz\u002F*",
"https:\u002F\u002Fwww.google.com.ua\u002F*",
"http:\u002F\u002Fwww.google.com.ua\u002F*",
"https:\u002F\u002Fwww.google.co.ug\u002F*",
"http:\u002F\u002Fwww.google.co.ug\u002F*",
"https:\u002F\u002Fwww.google.co.uk\u002F*",
"http:\u002F\u002Fwww.google.co.uk\u002F*",
"https:\u002F\u002Fwww.google.com.uy\u002F*",
"http:\u002F\u002Fwww.google.com.uy\u002F*",
"https:\u002F\u002Fwww.google.co.uz\u002F*",
"http:\u002F\u002Fwww.google.co.uz\u002F*",
"https:\u002F\u002Fwww.google.com.vc\u002F*",
"http:\u002F\u002Fwww.google.com.vc\u002F*",
"https:\u002F\u002Fwww.google.co.ve\u002F*",
"http:\u002F\u002Fwww.google.co.ve\u002F*",
"https:\u002F\u002Fwww.google.vg\u002F*",
"http:\u002F\u002Fwww.google.vg\u002F*",
"https:\u002F\u002Fwww.google.co.vi\u002F*",
"http:\u002F\u002Fwww.google.co.vi\u002F*",
"https:\u002F\u002Fwww.google.com.vn\u002F*",
"http:\u002F\u002Fwww.google.com.vn\u002F*",
"https:\u002F\u002Fwww.google.vu\u002F*",
"http:\u002F\u002Fwww.google.vu\u002F*",
"https:\u002F\u002Fwww.google.ws\u002F*",
"http:\u002F\u002Fwww.google.ws\u002F*",
"https:\u002F\u002Fwww.google.rs\u002F*",
"http:\u002F\u002Fwww.google.rs\u002F*",
"https:\u002F\u002Fwww.google.co.za\u002F*",
"http:\u002F\u002Fwww.google.co.za\u002F*",
"https:\u002F\u002Fwww.google.co.zm\u002F*",
"http:\u002F\u002Fwww.google.co.zm\u002F*",
"https:\u002F\u002Fwww.google.co.zw\u002F*",
"http:\u002F\u002Fwww.google.co.zw\u002F*",
"https:\u002F\u002Fwww.google.cat\u002F*",
"http:\u002F\u002Fwww.google.cat\u002F*",
"https:\u002F\u002Fhangouts.google.com\u002F*",
"http:\u002F\u002Fhangouts.google.com\u002F*",
"https:\u002F\u002Fdocs.google.com\u002F*",
"http:\u002F\u002Fdocs.google.com\u002F*",
"\u003Call_urls\u003E"
],
There's potentially other areas like that where data is stored in redux but never actually used.
Potential gains for LCP:
- Better TTFB because there will be less time spent generating the HTML in NodeJS and less content to compress by gzip
- Less bytes sent to users
Potential gains for interactivity:
- This could save some CPU time when doing
JSON.parse.
Also something I noticed on the triumvirate of slow uncommon pages: https://github.com/mozilla/addons-frontend/issues/10444, https://github.com/mozilla/addons-frontend/issues/10445, https://github.com/mozilla/addons-frontend/issues/10446.
For instance, the Dictionaries and Language Packs page is around 26K gzipped, 12K of it is coming from the redux store state <script> element. That's quite significant.
I like the overall idea as far as we do NOT have a different redux state on the server and on the client. In other words, we should aim at reducing the size of the redux state in general, not just the serialized state in the HTML. SSR is already complicated enough.
One obvious candidate I've found is the list of domains that addons want permissions for. I haven't seen that data used on the website so maybe it can be kept out of the store? [...] There's potentially other areas like that where data is stored in redux but never actually used.
This is a server issue. If the frontend receives data that we aren't using at all (on the current page or later), we could avoid returning it in the API responses. That would be good for both the server and the frontend.
I think it'd be good to review the data we receive from the API vs the data actually stored. There will still be some differences because our redux data isn't 1:1 with the API data but the difference shouldn't be that big.
less time spent generating the HTML in NodeJS
Given the metrics we have, this isn't really a concern right now FWIW.
I'm not sure we should focus on optimizing which API bits we need or not. This is unlikely to have that much impact, the permissions thing is an outlier, that affect only very specific add-ons, most don't do this. (We use some of the permissions on the frontend, but that's a frontend decision, the API returns every permission set and the frontend decides not to display them all)
I'm more interested into reducing size of redux state in general, and just not storing as much stuff in there.
I'm not sure we should focus on optimizing which API bits we need or not. This is unlikely to have that much impact, the permissions thing is an outlier, that affect only very specific add-ons, most don't do this. (We use some of the permissions on the frontend, but that's a frontend decision, the API returns every permission set and the frontend decides not to display them all)
I'm more interested into reducing size of redux state in general, and just not storing as much stuff in there.
For the most part we store what we need, so I'm not sure how much area for improvement there is, but we can definitely take a look. As @willdurand pointed out, we don't want the store to diverge between the client and the server, so whatever we need on one, we need on both.
This might just be a big red herring. If it's only a problem for specific add-ons, because of the amount of data that have, and we therefore store, I'm not sure it's something we can/should address.
I like the overall idea as far as we do NOT have a different redux state on the server and on the client. In other words, we should aim at reducing the size of the redux state in general, not just the serialized state in the HTML. SSR is already complicated enough.
Yeah agreed.
less time spent generating the HTML in NodeJS
Given the metrics we have, this isn't really a concern right now FWIW.
@willdurand Which metric is that? Great hit ratio in the nginx cache or fast enough server side generation time?
This might just be a big red herring. If it's only a problem for specific add-ons, because of the amount of data that have, and we therefore store, I'm not sure it's something we can/should address.
It could definitely be that. Maybe we could start by adding some instrumentation to track the size of the serialised redux store?
That being said, here is another outsized example: https://github.com/mozilla/addons-frontend/issues/10446#issuecomment-840452098
It looks like we dealt with the example at https://github.com/mozilla/addons-frontend/issues/10446#issuecomment-840452098 via https://github.com/mozilla/addons-server/issues/17163 (Stop exposing license text in versions API). The other example I see here is permissions. We don't limit the number of host permissions we display on the site to a particular number, but we do only display "Access your data for all websites" if we find a host permission that is the equivalent of <all_urls>, so there are some cases where we store a large number of permissions and then don't need to use them.
We don't generally add logic to the routines where we store things in the redux store, and rather execute the logic when displaying, but this is perhaps one place we could change that. On the other hand, this will only affect select add-ons, so I'm not sure if it's worth doing anything about at all.
@diox @willdurand Do you think we should consider preventing the storage of excess permissions in the redux store, or is this simply not worth doing.
Other than that, I'm not sure if there's any value in keeping this issue open, unless we want to define some other specific ways we think we can reduce the size of the redux store.
I think making a decision on this without data is difficult. I've found two places that had outsized Redux stores. Hence my suggestion to add some instrumentation to monitor the size of the Redux store (or the size of the HTML sent to visitors). That could form the basis of a budget for the HTML and/or Redux store? (The same way you have a budget for CSS and JS assets)
This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.
We have discussed, above, whether this is worth worrying about, but I'm not sure we made a final decision. There was a suggestion to track the size of the redux store in a metric, and I suppose we could do that. @diox Do you think that's worth doing, or should we just close this issue?
It's already a p4, we can leave it and let stalebot close it eventually if we haven't had the time to revisit this.
This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.