Closed Bug 1829800 Opened 3 years ago Closed 3 years ago

MDNCompatibility#getCSSDeclarationBlockIssues could be faster

Categories

(DevTools :: Inspector: Compatibility, task)

task

Tracking

(firefox114 fixed)

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

Attachments

(1 file)

  • we're using spread operator when calling functions and then rest operator in the function arg, creating unnecessary intermediary arrays
  • a single call to _getCompatSummary will result in 4 calls to _getCompatTable, when we can probably do a single one

In _getCompatSummary, we were indirectly calling getCompatTable multiple times
with the same parameters. We fix this by calling it once directly in _getCompatSummary,
and then looking into the result to extract the data we want.

This patch also removes unecessary spread/rest operators when we didn't get any
values from it.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8d6c43afb41b [devtools] Improve performance of MDNCompatibility methods. r=jdescottes,devtools-reviewers.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: