Closed Bug 518111 Opened 15 years ago Closed 14 years ago

Avoid using <stringbundle> and switch to nsIStringBundleService

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(fennec2.0+)

RESOLVED FIXED
Tracking Status
fennec 2.0+ ---

People

(Reporter: mfinkle, Assigned: mfinkle)

References

Details

Attachments

(1 file)

Fennec uses quite a few string bundles and mainly uses <stringbundle> to access the strings. The XBL overhead can be avoided. We should switch to use nsIStringBundleService, perhaps adding a global getter like we do with gPrefService.
Whiteboard: mobile-triage
Assignee: nobody → mark.finkle
Whiteboard: mobile-triage
Services.strings exists. We should do this to reduce XBL overhead and maybe get some Ts improvements
tracking-fennec: --- → 2.0+
Attached patch patchSplinter Review
* Removes <stringbundle> in browser.xul and adds a lazy 'Strings' object for accessing string bundles. * Changes getString -> GetStringFromName * Changes getFormmattedString -> FormatStringFromName I am running some Ts tests for before and after results and will post here when finished.
Average Ts results over 30 runs: Before: 6735 ms After: 6687 ms So we might have a small improvement. The main goal is removing as much XUL and XBL overhead as we can. This is a start.
Attachment #500607 - Flags: review?(21)
Attachment #500607 - Flags: review?(mbrubeck)
Comment on attachment 500607 [details] [diff] [review] patch You should also remove the Elements.browserBundle getter.
Attachment #500607 - Flags: review?(mbrubeck) → review+
pushed with Elements.browserBundle change http://hg.mozilla.org/mobile-browser/rev/56c2e0ec76f4
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Blocks: 627911
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: