Closed Bug 1491850 Opened 6 years ago Closed 6 years ago

restoreSavedBugComment takes a really long time (100ms)

Categories

(bugzilla.mozilla.org :: User Interface, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jrmuizel, Unassigned)

Details

(Keywords: perf)

Attachments

(1 file)

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
Closed: 6 years ago
Resolution: --- → FIXED
Type: enhancement → defect
Component: User Interface: Modal → User Interface
Assignee: kohei.yoshino → nobody
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: