restoreSavedBugComment takes a really long time (100ms)

RESOLVED FIXED

Status

()

RESOLVED FIXED
6 months ago
6 months ago

People

(Reporter: jrmuizel, Assigned: kohei)

Tracking

({perf})

Production

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 months ago
This seems to happen on every tab switch.

Here's a profile of switching between to bugzilla tabs:

https://perfht.ml/2MF5tsl
Looks like some people find it useful that their draft comment is synced between tabs [1] but it’s probably not an expected behaviour for the comment restore functionality, which should be triggered only when the page is loaded. I’d remove the `pageshow` and `focus` event listeners while keeping `DOMContentLoaded`. (I’m not the implementer of the functionality.)

[1] https://twitter.com/kelimuttu/status/1039068104066658304
Assignee: nobody → kohei.yoshino
Status: NEW → ASSIGNED
Component: Extensions: BMO → User Interface: Modal
Keywords: perf
`pageshow` is fine, `focus` is the culprit.
Merged to master.
Status: ASSIGNED → RESOLVED
Last Resolved: 6 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.