WebKit / Speedometer

An open source repository for the Speedometer benchmark
Other
614 stars 73 forks source link

Additional task is scheduled in the async time of NewsSite-Next case #302

Closed shiyu-zhang closed 1 year ago

shiyu-zhang commented 1 year ago

RAF measurement method is intended to include the complete render reflow process in the async time. However, current RAF measurement method will also result in additional async task is scheduled in the async time of the NewsSite-Next case. It's because _syncCallback and _asyncCallback timer are registered in separate RAFs. The Timer measurement method does not have this problem as it registers _syncCallback and _asyncCallback timer in the same setTimeout. Is it on purpose to include such async task in the async time?

image

A quick hack to verify the score impact: image

rniwa commented 1 year ago

Yes, we've specifically designed rAF based measurement to include all async operations in async time including cases like this.

shiyu-zhang commented 1 year ago

Thanks, glad to know that.