Closed Bug 1642398 Opened 5 years ago Closed 5 years ago

Prefer a single document.l10n.formatValues call to multiple document.l10n.formatValue calls.

Categories

(Developer Infrastructure :: Lint and Formatting, task)

Tracking

(firefox80 fixed)

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: mossop, Assigned: mossop)

References

Details

(Keywords: perf-alert)

Attachments

(1 file)

Not sure how lintable this is but we should prefer document.l10n.formatValues over multiple calls to document.l10n.formatValue. See https://searchfox.org/mozilla-central/source/browser/base/content/pageinfo/pageInfo.js#291-303 for a poor example.

I was thinking that maybe we could lint for multiple calls to document.l10n.formatValue in the same code block.

Summary: Prefer a single document.l10n.formatValues to multiple document.l10n.formatValue calls. → Prefer a single document.l10n.formatValues call to multiple document.l10n.formatValue calls.

I think we should probably block on bug 1642423 for this to get a nicer syntax.

Depends on: 1642423
Assignee: nobody → dtownsend
Depends on: 1642731

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:mossop, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(dtownsend)

This patch cannot land until the lints it complains about are fixed.

Flags: needinfo?(dtownsend)
Pushed by dtownsend@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d9b23a8775ca Add a lint rule to warn about multiple calls to document.l10n.formatValue. r=Standard8,preferences-reviewers,ntim
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
Regressions: 1651537

== Change summary for alert #26519 (as of Thu, 16 Jul 2020 06:24:24 GMT) ==

Improvements:

33% build times windows2012-32-shippable opt instrumented taskcluster-c5.4xlarge 2,196.05 -> 1,478.37
32% build times windows2012-32-shippable opt instrumented taskcluster-c5d.4xlarge 2,189.45 -> 1,498.75
28% build times windows2012-32-shippable opt instrumented taskcluster-m5.4xlarge 2,280.53 -> 1,637.17

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=26519

Keywords: perf-alert

(In reply to Florin Strugariu [:Bebe] (needinfo me) from comment #7)

== Change summary for alert #26519 (as of Thu, 16 Jul 2020 06:24:24 GMT) ==

Improvements:

33% build times windows2012-32-shippable opt instrumented taskcluster-c5.4xlarge 2,196.05 -> 1,478.37
32% build times windows2012-32-shippable opt instrumented taskcluster-c5d.4xlarge 2,189.45 -> 1,498.75
28% build times windows2012-32-shippable opt instrumented taskcluster-m5.4xlarge 2,280.53 -> 1,637.17

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=26519

This is misattribution. The improvement comes from bug 1651938.

Regressions: 1657679
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: