Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does enabling Paint Flashing substantially increase Frame rate?

This is the code in question. However, I can demonstrate the same effect on most website pages, this page being one of them.

When measuring the framerate with the FPS meter built into google chrome the frame rate is between 15 and 35. However, when one enables Paint Flashing, the framerate is an (almost) steady 60fps.

I am using User Timing API to measure the time taken to run the animation javascript, and there seems to be no noticeable difference between running with or without Paint Flashing enabled.

I have tested this using Google Chrome Beta Version 52.0.2743.41 beta (64-bit, Arch Linux) and Version 52.0.2743.116 m (64-bit, Windows 10) and the results are consistent.

So, I have two questions:

  1. Why does this occur
  2. If this increases the performance of pages, why is this not present in the normal rendering process of chrome?

Pictures:

Without Paint Flashing:

without paint flashing

With Paint Flashing:

with paint flashing

like image 280
BSL-5 Avatar asked Aug 12 '16 00:08

BSL-5


1 Answers

This issue has been Available for over a year, and has been marked "WontFix". The FPS meter in the compositor by design picks up any other work in the system before it, including paint flashing. The developers of chromium would need to move to an RAF-based or another form of FPS counting to not run into this issue.

like image 188
BSL-5 Avatar answered Nov 01 '22 09:11

BSL-5