Closed
Bug 1679096
Opened 4 years ago
Closed 3 years ago
Async support for Localization in rust
Categories
(Core :: Internationalization, task, P3)
Core
Internationalization
Tracking
()
RESOLVED
DUPLICATE
of bug 1613705
People
(Reporter: u480271, Assigned: u480271)
References
Details
Attachments
(4 files, 1 obsolete file)
This is the async part of Bug 1613705 and builds upon those patches.
For the async methods, resolve promise from Rust. Still using the sync versions
to format values and messages.
Depends on D97905
Comment 6•3 years ago
|
||
Can you provide a try run with all the necessary patches applied? that way I can make sure that the suggestions I provide in reviews actually work.
Flags: needinfo?(dan.glastonbury)
Comment 7•3 years ago
|
||
The current best way is to:
- Take mozilla-central
- Apply bug 1679095 (D97904)
- Apply bug 1679094 (D97905)
- Apply bug 1613705 (D91709) (that WIP includes all the patches from this review stack, we keep them here to make reviewing easier for you)
Build, launch and you should be able to execute this in a browser console:
(async () => {
let start = performance.mark("loc-start");
let loc = new Localization([
"branding/brand.ftl",
"browser/branding/brandings.ftl",
"browser/branding/sync-brand.ftl",
"browser/preferences/preferences.ftl",
"browser/preferences/fonts.ftl",
"toolkit/featuregates/features.ftl",
"browser/preferences/addEngine.ftl",
"browser/preferences/blocklists.ftl",
"browser/preferences/clearSiteData.ftl",
"browser/preferences/colors.ftl",
"browser/preferences/connection.ftl",
"browser/preferences/languages.ftl",
"browser/preferences/permissions.ftl",
"browser/preferences/selectBookmark.ftl",
"browser/preferences/siteDataSettings.ftl",
"browser/aboutDialog.ftl",
"browser/sanitize.ftl",
"toolkit/updates/history.ftl",
"security/certificates/deviceManager.ftl",
"security/certificates/certManager.ftl",
]);
let values = await loc.formatMessages([{id: "community-2"}]);
let end = performance.mark("loc-end");
//console.log(values);
performance.measure("localization", "loc-start", "loc-end");
console.dir(performance.getEntriesByName("localization").map((e) => e.duration));
})()
where Localization2
is using Rust, and Localization
is using JSMs.
Flags: needinfo?(dan.glastonbury)
Comment 8•3 years ago
|
||
This work is now incorporated into WIP patches in bug 1613705.
I'm going to close it in favor of that.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Updated•3 years ago
|
Attachment #9189555 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•