Closed Bug 1598734 Opened 5 years ago Closed 5 years ago

Profiler shortcuts should still work fine when mashed a bunch

Categories

(DevTools :: Performance Tools (Profiler/Timeline), defect, P3)

defect

Tracking

(firefox78 fixed)

RESOLVED FIXED
Firefox 78
Tracking Status
firefox78 --- fixed

People

(Reporter: gregtatum, Assigned: gregtatum)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

If the profiler hangs when capturing a profile, it's easy to hit the shortcut multiple times to ensure it's opening. The problem is that then multiple tabs are opened and attempt to load the profile. This can lead to errors, and getting the profiler into a bad state.

We should make sure that the shortcuts don't send a bunch of duplicate commands through when hanging. For instance:

Steps to reproduce:

  • CtrlShift+1
  • Do something in the browser
  • CtrlShift+2
  • Hang
  • CtrlShift+2
  • CtrlShift+2

Expected results:

Only one tab should open with the profile

Actual results:

Multiple tabs open, and throw errors from all trying to load the profile.

On linux, there's also a hang when starting the profile, and it's very common that a press the shortcut to start twice -- as as result it stops right away :-)

If we implement an immediate visual feedback this will help too. (I think we have a separate bug for this already)

This patch handles the issue where a user sends two commands two toggle the profiler and/or
capture. This gets the profiler UI in a weird state that usually is just because the UI
is hanging and lagging. This makes the profiler pause state into a "capturing" state.
I did not include a test with the behavior change, as I was worried about intermittent
failures on asserting this behavior.

Depends on D75849

Assignee: nobody → gtatum
Status: NEW → ASSIGNED
Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/147bf269db00 Refine background script toggleProfiler and captureProfile commands; r=canaltinova
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 78
QA Whiteboard: [qa-78b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: