Closed Bug 1420291 Opened 8 years ago Closed 8 years ago

RequestListContent could instanciate RequestListContextMenu lazily

Categories

(DevTools :: Netmonitor, enhancement, P2)

enhancement

Tracking

(firefox61 fixed)

RESOLVED FIXED
Firefox 61
Tracking Status
firefox61 --- fixed

People

(Reporter: ochameau, Assigned: glowka.tom)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

Today we instanciate RequestListContextMenu on componentWillMount: https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/src/components/RequestListContent.js#65-71 It forces loading its module immediately. But I think we can delay its load and instanciation in onContextMenu function: https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/src/components/RequestListContent.js#200-203 So that we speed up netmonitor opening.
Hey, this seems pretty clear, just replacing pure require with lazyGetter, right? I could do that, if it makes sense.
Flags: needinfo?(odvarko)
(In reply to glowka.tom from comment #1) > Hey, this seems pretty clear, just replacing pure require with lazyGetter, > right? I could do that, if it makes sense. lazyGetter is not available in this scope. But, AFAIU this is about moving the `new RequestListContextMenu({...})` code from componentWillMount to onContextMenu. Honza
Flags: needinfo?(odvarko)
OK, so please assign it to me.
Flags: needinfo?(odvarko)
Attachment #8959561 - Flags: review?(odvarko)
Assignee: nobody → glowka.tom
Status: NEW → ASSIGNED
Flags: needinfo?(odvarko)
Comment on attachment 8959561 [details] Bug 1420291 - instanciate RequestListContextMenu lazily https://reviewboard.mozilla.org/r/228362/#review234686 Looks good, thanks for the patch! R+ assuming try is green Honza
Attachment #8959561 - Flags: review?(odvarko) → review+
Also, please rebase on top of m-c before landing. Honza
Btw. you already know you need to set checkin-needed, right? Honza
(In reply to Jan Honza Odvarko [:Honza] from comment #6) > Also, please rebase on top of m-c before landing. > Honza Rebased. (In reply to Jan Honza Odvarko [:Honza] from comment #7) > Btw. you already know you need to set checkin-needed, right? > > Honza Yeah, but good to be reminded, thanks!
Keywords: checkin-needed
Pushed by nerli@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e63bab1349dd instanciate RequestListContextMenu lazily r=Honza
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Product: Firefox → DevTools
Depends on: 1467522
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: