Closed Bug 1686810 Opened 5 years ago Closed 5 years ago

The FPS display in the WR profiler overlay shows confusing values

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: mstange, Assigned: mstange)

Details

Attachments

(1 file)

When you enable the WR profiler overlay with the gfx.webrender.debug.profiler pref, there's an FPS number displayed in the top left corner. That number updates twice a second.

The FPS number that is displayed is very confusing. It does not display how many frames we rendered within a second. Instead, it is based on the slowest time between two subsequent frames that was encountered in the current half-second window:

set_text!(&mut text_buffer, "{:.2} fps", 1000.0 / self.counters[FRAME_TIME].max);

So if you have a 60fps animation, but skip one frame, it'll display 30 fps because the skipped frame causes a single 33ms frame time. In this scenario, I would expect a number of 59fps instead.

In practice, the counter jumps around wildly and always looks worse that what the actual performance is.

Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/e9cd13398944 Make the fps counter display the number of frames rendered within the last second. r=nical
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: