Closed
Bug 905325
Opened 11 years ago
Closed 11 years ago
about:networking - make refreshing feature only request data for active tab
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: robertbindar, Assigned: robertbindar)
References
Details
(Whiteboard: [engineering-friend])
Attachments
(1 file, 3 obsolete files)
4.16 KB,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0 (Beta/Release) Build ID: 20130627161625 Steps to reproduce: We should refresh data only for the active tab. Now refreshing feature requests data for all the tabs, not just for the active one causing a lack of performance.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #791738 -
Flags: review?(valentin.gosu)
Comment 2•11 years ago
|
||
As we discussed today, maybe it's better if the Refresh button refreshes all of the tabs, while the auto-refresh checkbox only refreshes the current tab. The reason being that when you use the refresh button, you might probably want to get a "snapshot" of the current state.
Assignee | ||
Comment 3•11 years ago
|
||
Refresh button produces an overall refresh and auto-refresh checkbox only refresh the active tab.
Attachment #791738 -
Attachment is obsolete: true
Attachment #791738 -
Flags: review?(valentin.gosu)
Attachment #793588 -
Flags: review?(ttaubert)
Comment 4•11 years ago
|
||
Comment on attachment 793588 [details] [diff] [review] independent refresh v2 Review of attachment 793588 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/content/aboutNetworking.js @@ +131,5 @@ > document.getElementById("confpref").addEventListener("click", confirm); > } > > + for (let id in gRequestNetworkingData) > + requestNetworkingData(id); This is used in the click handler as well and could be moved to a separate function like refreshAllNetworkingData() or the like. Maybe you could also name it requestAllNetworkingData() and rename the existing function to requestNetworkingDataForTab(). @@ +151,5 @@ > let refr = document.getElementById("refreshButton"); > + refr.addEventListener("click", function() { > + for (let id in gRequestNetworkingData) > + requestNetworkingData(id); > + }); refr.addEventListener("click", requestAllNetworkingData); @@ +187,5 @@ > + if (autoRefresh.checked) { > + clearInterval(autoRefresh.interval); > + autoRefresh.interval = setInterval(function() { > + requestNetworkingData(button.value); > + }, REFRESH_INTERVAL_MS); This too should be moved to a separate function as it just repeats the code from above.
Attachment #793588 -
Flags: review?(ttaubert) → feedback+
Updated•11 years ago
|
Assignee: nobody → robertbindar
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: Linux → All
Hardware: x86_64 → All
Version: 22 Branch → Trunk
Assignee | ||
Comment 5•11 years ago
|
||
Attachment #793588 -
Attachment is obsolete: true
Attachment #793966 -
Flags: review?(ttaubert)
Updated•11 years ago
|
Updated•11 years ago
|
Whiteboard: [engineering-friend]
Comment 6•11 years ago
|
||
Comment on attachment 793966 [details] [diff] [review] independent refresh v3 Review of attachment 793966 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the two minor issues addressed. ::: toolkit/content/aboutNetworking.js @@ +140,2 @@ > > document.getElementById("autorefcheck").addEventListener("click", function() { When initializing, we should check for checkbox.checked. When reloading the page with F5 after clicking the checkbox, it will actually stay checked on the next page load and we should set the interval right at the start. @@ +191,5 @@ > +function setAutoRefreshInterval(checkBox) { > + let active_tab = document.querySelector(".active"); > + checkBox.interval = setInterval(function() { > + requestNetworkingDataForTab(active_tab.id); > + }, REFRESH_INTERVAL_MS); Indentation is a little off here.
Attachment #793966 -
Flags: review?(ttaubert) → review+
Assignee | ||
Comment 7•11 years ago
|
||
Attachment #793966 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 8•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/dac79403a822
Keywords: checkin-needed
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/dac79403a822
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•