GNOME Bugzilla – Bug 755379
Each Epiphany app instance downloads its own adblock filters list
Last modified: 2016-12-24 16:28:59 UTC
Created attachment 311816 [details] screenshot As you can see in the attached screenshot from ~/.config/epiphany, Web saves and update a complete EasyList adblock filter list for not just the main profile, but also every "web app" instances... which seems quite inefficient to me, as it means it needs to download/update ~1.6 MB+ of filters on every startup for those instances, while it's the exact same file as the main instance (heck, it could just be a soft relative symbolic link to the parent...)
Since AdBlock filters are big (1.7 MB nowadays), we need to write a profile migrator to delete filters from existing profile directories when fixing this bug.
(In reply to Michael Catanzaro from comment #1) > Since AdBlock filters are big (1.7 MB nowadays), we need to write a profile > migrator to delete filters from existing profile directories when fixing > this bug. I'm going to be lazy and not do this, it's not so big.
The following fix has been pushed: 03d53f0 uri-tester: Steal adblock filters from default profile in app mode
Created attachment 338781 [details] [review] uri-tester: Steal adblock filters from default profile in app mode Since adblock filters are big, we don't want to keep a separate copy for each app. This became easy to implement after moving EphyUriTester to the UI process.
Does it make sense to move this to XDG_CACHE_HOME instead? It's not anything close to being configuration data.
Yes it does. That touches on a longstanding issue we have to figure out... we have a bunch of stuff under our profile directory in XDG_CONFIG_HOME that should move to XDG_DATA_HOME (or I guess in this case, XDG_CACHE_HOME indeed). But currently Epiphany stores all its profile data in a single directory, so we'd have to change this and modify several places in the code. Basically, we'd have to replace ephy_dot_dir() with new functions ephy_profile_config_dir(), ephy_profile_data_dir(), ephy_profile_cache_dir(). That's another bug entirely, though.
fwiw, I've stopped thinking that ~/.local/share/ is a good place for "random app data" some time ago. ~/.var/app/org.gnome.ephy/ is my preferred place for this stuff these days (which is the convention that flatpak also follows). Of course, we should probably introduce some new fancy XDG_STATE_HOME envvar or something for this. To answer the obvious question: although I've discussed this with a lot of people, I've never written it down anywhere or proposed it to the XDG spec. :(
(In reply to Allison Lortie (desrt) from comment #7) > fwiw, I've stopped thinking that ~/.local/share/ is a good place for "random > app data" some time ago. ~/.var/app/org.gnome.ephy/ is my preferred place > for this stuff these days (which is the convention that flatpak also > follows). ...why? XDG_DATA_HOME is established convention at this point, why move it somewhere else...?
See https://lists.freedesktop.org/archives/xdg/2016-December/013803.html for some more motivation/background.