Closed Bug 1511102 Opened 6 years ago Closed 5 years ago

The about:performance table should be updated immediately when switching back to the tab

Categories

(Toolkit :: Performance Monitoring, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 file)

It's currently pretty common that when leaving about:performance open in a tab and switching back to it later, it looks broken because it takes several seconds to refresh. This happens because the refresh happens every 2s using a timer. This leaves 2s for the user to move the mouse above the table and trigger the "don't refresh for 5s after a mouse event" case we added to prevent closing the wrong tab. So if the user moves the mouse over the table within the first 2s after switching back to the tab, it'll take 6s before it updates... if the user stops moving the mouse. If the user gets impatient and keeps nervously moving the mouse, it'll never update.
Attached patch PatchSplinter Review
Attachment #9028711 - Flags: review?(felipc)
Comment on attachment 9028711 [details] [diff] [review]
Patch

Review of attachment 9028711 [details] [diff] [review]:
-----------------------------------------------------------------

What does this do right after the page loads? Will it not trigger a double update?
Comment on attachment 9028711 [details] [diff] [review]
Patch

Review of attachment 9028711 [details] [diff] [review]:
-----------------------------------------------------------------

Preemptive r+ if you make sure it doesn't cause a double update at the beginning.
Attachment #9028711 - Flags: review?(felipc) → review+
(In reply to :Felipe Gomes (needinfo me!) from comment #2)
> Comment on attachment 9028711 [details] [diff] [review]
> Patch
> 
> Review of attachment 9028711 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> What does this do right after the page loads? Will it not trigger a double
> update?

There's already a double update due to https://searchfox.org/mozilla-central/rev/fd32b3a6fa3eff1468311f6fcf32b45c117136df/toolkit/components/aboutperformance/content/aboutPerformance.js#1472-1473 that I should remove when removing the code of the old about:performance.

I've verified that this patch doeesn't cause a third update near page load.
Pushed by florian@queze.net:
https://hg.mozilla.org/integration/mozilla-inbound/rev/526d733d3c62
update the about:performance table immediately when switching back to the tab, r=felipe.
https://hg.mozilla.org/mozilla-central/rev/526d733d3c62
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: