Closed Bug 919459 Opened 9 years ago Closed 4 years ago
Lightweight themes should not store their data in preferences
It seems that lightweight themes store their data in preference lightweightThemes.usedThemes – we have one report of this being a 20kb field, which is just plainly wrong, as this slows down all uses of preferences, including startup and shutdown. That data should be moved to its own file.
9 years ago
Component: General → Themes
Product: Firefox → Toolkit
Yep - thought we had a bug for this, can't find one :\ That pref is an array - the selected lightweight theme is the first item in that array. Would be good to avoid any additional IO on startup, so I think we should store the themes in a file, and the minimum required data for the current lightweight theme in a pref.
(In reply to David Rajchenbach Teller [:Yoric] from comment #0) > It seems that lightweight themes store their data in preference > lightweightThemes.usedThemes – we have one report of this being a 20kb > field, which is just plainly wrong, as this slows down all uses of > preferences, including startup and shutdown. > > That data should be moved to its own file. That report could be from me; but FWIW I have an insanely large number of lightweight themes installed (of which only the first element of the array is used, of course). I don't change them very often, because I've found out how to use lightweight & heavyweight themes together, but instead of no-restart (as with the Default theme) changing a lightweight theme when a heavyweight theme other than Default is in use may require up to three successive restarts (1: set the LWT, which also sets Default, and restart; 2: set the HWT, which clears the LWT, and restart; 3: set lightweightThemes.isThemeSelected to true and restart). Startup and shutdown aren't very fast, but I'm attributing it to the number of my tabs (about 100) and I've taken up the habit of checking the evolution of memory use while SeaMonkey is closing down. :-)
Indeed, that's your report. Now, we are going to fix this (eventually) and it's going to contribute to improving your startup/shutdown time whether you want it or not :)
It's not uncommon for users to have many themes installed, so this should block bug 872980.
I have found out that for some reason, only my 30 "most recently used" lightweight themes are emembered in lightweightThemes.usedThemes. Any additional themes are *silently* forgotten, which IMHO violates ux-control and possibly ux-userfeedback and/or ux-mode-error; also, it might be enough for a "critical:dataloss" bug report. I don't know if this is a limitation of the Toolkit add-ons manager itself, or of the "Lightweight Themes Manager" extension which I am using (BTW: let's CC the extension author), but I'd like to be able to overcome it, possibly by means of a preference. I know that such a large pref value entails a performance slowdown not only at startup and shutdown, but every time prefs.js is saved, but I can live with that. (Some other people possibly couldn't.) As a (clumsy) workaround, I save the data for my "full collection" in an external JSON file which I can either "Restore" using the Lightweight Themes Manager extension, or even paste into the pref via the clipboard (with slightly different results where slash-escapes, HTML tags, and UTF-8 characters above U+007F are used), but the 31st and following themes still don't get remembered very long, and of course nothing in the browser (be it built-in Toolkit backends and UI, or any enabled extensions) is aware of them once they are forgotten.
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.