Closed
Bug 869709
Opened 12 years ago
Closed 12 years ago
Define inline manifest API
Categories
(L20n :: HTML Bindings, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
1.0 beta
People
(Reporter: zbraniecki, Assigned: zbraniecki)
References
Details
Attachments
(1 file, 1 obsolete file)
|
2.48 KB,
patch
|
stas
:
review+
|
Details | Diff | Splinter Review |
We currently have no way to inline the manifest.json file. It could be a win for fxos scenarios.
Comment 1•12 years ago
|
||
As a reminder, see https://github.com/l20n/l20n.js/blob/master/bindings/README.md for the current HTML API.
Manifest files are linked to like so:
<link rel="localization" href="../locales/browser.json">
Comment 2•12 years ago
|
||
Gandalf, do you have any perf numbers to share?
| Assignee | ||
Comment 3•12 years ago
|
||
I mean, inlining the content of the manifest to halve the number of files loaded at startup.
Comment 4•12 years ago
|
||
I understand, I'm just wondering what the potential perf gain is. IIRC, last time we concluded that file IO *is not* where we should be looking for perf gains.
Bug 868930 is related.
| Assignee | ||
Comment 5•12 years ago
|
||
Last time I measured it was:
manifest: 1106ms (24)
no-manifest: 1067ms (16)
I believe this number to be around 30-40ms.
Updated•12 years ago
|
Assignee: nobody → gandalf
Priority: -- → P2
Target Milestone: --- → 1.0 beta
| Assignee | ||
Comment 6•12 years ago
|
||
Comment 7•12 years ago
|
||
Reading the patch, it looks like the proposed syntax is:
<meta name="languages" content="pl, fr, de">
<meta name="resources" content="../locales/{{lang}}/res.l20n, /shared/{{lang}}/res.l20n">
It looks good to me except the fact that the comma is a valid character to have in URLs. Reading http://www.ietf.org/rfc/rfc3986.txt, may I suggest "|" (the pipe character) as a delimiter of the resources' URLs?
Also, should all of this go into bindings/l20n/html.js or bindings/l20n/gaia.js (a new file)?
| Assignee | ||
Comment 8•12 years ago
|
||
patch with "," replaced by "|" as per stas suggestion
Attachment #749065 -
Attachment is obsolete: true
Attachment #751749 -
Flags: review?(stas)
| Assignee | ||
Updated•12 years ago
|
Status: NEW → ASSIGNED
Comment 9•12 years ago
|
||
Comment on attachment 751749 [details] [diff] [review]
patch
Review of attachment 751749 [details] [diff] [review]:
-----------------------------------------------------------------
::: bindings/l20n/gaia.js
@@ +32,5 @@
> + var metaRes = headNode.querySelector('meta[name="resources"]');
> + if (metaLang && metaRes) {
> + initializeManifest({
> + 'languages': metaLang.getAttribute('content').split('|').map(String.trim),
> + 'resources': metaRes.getAttribute('content').split('|').map(String.trim)
I think I'd prefer the comma for languages and the pipe for resources, but I don't have a strong opinion about this.
Attachment #751749 -
Flags: review?(stas) → review+
| Assignee | ||
Comment 10•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•