Bug 91172 - [PerfTest] Add performance tests for image decoding
Summary: [PerfTest] Add performance tests for image decoding
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 77037 90375
  Show dependency treegraph
 
Reported: 2012-07-12 17:33 PDT by Kwang Yul Seo
Modified: 2012-07-26 23:07 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kwang Yul Seo 2012-07-12 17:33:43 PDT
We need performance tests for image decoding. However, it seems hard to measure image decoding time because images are decoded only when they actually need to be painted. How can we wait until all the images are actually painted in a PerfTest case?
Comment 1 Dongseong Hwang 2012-07-25 23:21:05 PDT
Some people felt the necessary in 2009.
http://trac.webkit.org/wiki/QtWebKit/CodeCamp200912

I quote
"Presentation on how to support JavaScript programmers to see what is going on. Currently a JavaScript API to expose information about painting is exposed. This API is similiar to the Mozilla mozAfterPaint Event. This way a JavaScript developer can see which content will be redrawn due his code. Another thing is to export the FPS count for drawing to the JavaScript developer. This somehow relates to the WebTime effort of the W3C. In the future we will need a heap profiler that will show the heap usage for each callframe of the JavaScript execution and finally we need the ability to do this on the device and get the data on the host."

However, I think there had not been any progress yet because I can not find the relevant code in the upstream WebKit.

WebKitAfterPaintEvent seems the solution to measure image decoding time.
Comment 2 Kwang Yul Seo 2012-07-26 21:43:22 PDT
(In reply to comment #1)
> WebKitAfterPaintEvent seems the solution to measure image decoding time.

Okay. We can add an event that is similar to MozAfterPaint. I think both layout tests and performance tests can use it.

Are there other private events used only for tests in WebKit? If so, we can start from there.
Comment 3 Ryosuke Niwa 2012-07-26 22:38:33 PDT
(In reply to comment #2)
> (In reply to comment #1)
> > WebKitAfterPaintEvent seems the solution to measure image decoding time.
> 
> Okay. We can add an event that is similar to MozAfterPaint. I think both layout tests and performance tests can use it.
> 
> Are there other private events used only for tests in WebKit? If so, we can start from there.

I'm not sure if that's a good idea... I'd prefer recording fps instead. Also, measuring paint performance from DRT is kind of bogus because it never paints to screen.
Comment 4 Kwang Yul Seo 2012-07-26 23:07:21 PDT
(In reply to comment #3)
> I'm not sure if that's a good idea... I'd prefer recording fps instead. Also, measuring paint performance from DRT is kind of bogus because it never paints to screen.

Because decoded images are cached, we can't measure image decoding time with FPS. Or we need an API to clear all decoded image caches.