Closed Bug 341976 Opened 19 years ago Closed 19 years ago

storage.sdb entries should not use absolute paths to search plugins files (storage size optimization)

Categories

(Firefox :: Search, enhancement)

2.0 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 2 beta1

People

(Reporter: regis.caspar+bz, Assigned: Gavin)

Details

(Keywords: fixed1.8.1)

Attachments

(1 file)

Since the landing of bug 335101, some preferences related to search plugins are stored in "storage.sdb". In this file, absolute paths to each installed search plug-in are stored. Stored value should use some kind of TAG (e.g. "[Profile]" + PATH_SEPARATOR + "foo.xml") and not full paths in order minimize storage size.
Full URIs are used to uniquely identify engine files, since there are multiple possible locations for engine files other than the profile (extension, app-dir). The storage size of full paths is minimal compared to other metadata stored in the profile, and the code complexity that would be required to support this isn't worth the minimal space savings. I recommend WONTFIX.
(In reply to comment #1) > Full URIs are used to uniquely identify engine files, since there are multiple > possible locations for engine files other than the profile (extension, > app-dir). That doesn't block the possibility to use "[extension]\foo.xml" "[app-dir]\bar.xml".
I still don't think it's worth the effort. Are you really that concerned about the 100 or so bytes per engine that this would save? :)
(In reply to comment #3) > I still don't think it's worth the effort. Are you really that concerned about > the 100 or so bytes per engine that this would save? :) Having 320gigs of HD space I would say no :) Just to have some mathematics into this: I've 29 search engines. 12ko with actual storage logic and 5ko with [app-dir] and [profile]. But this can be WONTFIX'ed if you want, that was just a proposal/remark
For the sake of the argument, using keys would allow people to move profile data from one machine to the other, and it'd probably help projects like portable fox.
(In reply to comment #5) > For the sake of the argument, using keys would allow people to move profile > data from one machine to the other, and it'd probably help projects like > portable fox. You're right, I hadn't considered the portable Firefox use-case, and now that I think of it a bit more, it shouldn't be too complicated. I'll make a patch - I think we should land this at the same time as bug 341975 to avoid breaking existing profiles.
Attached patch patchSplinter Review
There isn't very much we can do about extension-shipped plugins, since those can be anywhere, so this keeps the full path for anything that's non-profile or non-app.
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Comment on attachment 226126 [details] [diff] [review] patch I want to land this with the patch to change the engine metadata file.
Attachment #226126 - Flags: review?(mconnor)
Attachment #226126 - Flags: approval-branch-1.8.1?(mconnor)
Attachment #226126 - Flags: review?(mconnor)
Attachment #226126 - Flags: review+
Attachment #226126 - Flags: approval-branch-1.8.1?(mconnor)
Attachment #226126 - Flags: approval-branch-1.8.1+
mozilla/browser/components/search/nsSearchService.js 1.1.2.33
Keywords: fixed1.8.1
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Firefox 2 beta1
Version: Trunk → 2.0 Branch
mozilla/browser/components/search/nsSearchService.js 1.41
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: