A draft CL is up here, and aside from potential layering issues, it seems to get the job done reasonably.
--
You received this message because you are subscribed to the Google Groups "paint-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to paint-dev+...@chromium.org.
To post to this group, send email to pain...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/paint-dev/CADjAqN6_otrkdXuB7pdEj%3Dx83fLq_9ns73PVeVMZGz%2Bd0QmazA%40mail.gmail.com.
--
Hi paint team,After a discussion with Chris at BlinkOn, we're planning on implementing the Speed Index metric in chrome and reporting it to UMA.Brief background: Speed Index tries to calculate the average time that elements are visible in the viewport. This entails calculating the integral of % visual complete over time.So far, we're using invalidation rects here, we're seeing good numbers compared to calculations using video capture. However, we'd like to improve things even more.1. PaintInvalidationReason looks really helpful to us. Are there Reasons that we should discard as not affecting user perception of loading? Scroll and Selection look like good candidates for this. Are there some reasons that should be weighted more?
2. Can we annotate the invalidations with more information? I'm not sure the extent of information the layout objects have, but it would be great to somehow know if the invalidation was "contentful" i.e. text/image. I realize this might not be possible.
3. Is the place we are instrumenting (GraphicsLayer::invalidateDisplayItemClient) the right place? Chris mentioned PaintController is the place to do this, but so far that's the only caller (and it's where the rest of our metrics are instrumented). Will this change as SlimmingPaint progresses?A draft CL is up here, and aside from potential layering issues, it seems to get the job done reasonably.
--
Thanks for the info! What you suggest (Using SkPicture::approximateOpCount()) sounds really interesting. Unfortunately, my understanding of the painting pipeline is rather limited.What is the relationship between SkPictures and invalidation rects? My understanding is that the invalidation rects are tied to layout objects (display item clients), while SkPictures are the actual commands to paint which are generated later. Would moving to analyzing SkPictures replace the invalidation rect approach, or could it work in tandem (i.e. record invalidation rects, then weight them as SkPictures are created)?
if (visualRect) { // TODO(wkorman): cache visualRect for the client. }
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/paint-dev/CADjAqN4Aw8aDB4b0MfZuYwX2nndnaC84PHVP2brPK0%2BfqossoQ%40mail.gmail.com.
Is this meant to run on all page loads or just ones where tracing or some instrumentation is turned on?
Great! I have a working algorithm right now that just logs every invalidation as it comes in, but I can sit on that until your changes start landing. I'm hopeful that this approach will be cleaner and more accurate than my current version.
--
You received this message because you are subscribed to the Google Groups "paint-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to paint-dev+...@chromium.org.
To post to this group, send email to pain...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/paint-dev/CADjAqN7%3DfVYw3XNJqUgbg9aqxjyAJgUEcBDEkJANzVuQUxNteg%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "Chromium Loading Performance" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loading-dev...@chromium.org.
To post to this group, send email to loadi...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/loading-dev/CADjAqN6FB0JcGUrqNYX%2BknK_jiAmfF-QTcie7Gg6ZgxDeWOLQg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/paint-dev/CADjAqN6b9EtT%2BXXERxB%3DK1q-nBP09OFyxhcDJLFN5Z5%3D0u48mw%40mail.gmail.com.
Question for paint team: Are you ready to commit to keeping around invalidation rects indefinitely? My recollection is that this is still an option question.
Ojan, great questions.1. The original goal was to expose more reliable UMA. I think that will be the litmus test for further exposure. Hopefully in the future this could get exposed both in tracing/devtools as well as RUM/js if the metric proves reliable and accurate.The only reason I can think of that would prevent exposure would be- The metric is unreliable (see below).- We cannot afford to calculate the metric for every page load (memory, etc.)
2. Yeah, the video capture SpeedIndex in WPT only captures ATF content, as it tries to measure user perception. If the user scrolls we'll probably end up invalidating the calculation. Anything else I imagine would be more noisy and less correct.
This fact makes me wary about reporting this statistic to RUM, as we may not want to report a value that isn't collected every page load.Alternatively, it might make sense to calculate SpeedIndex looking at the rect that is visible to the user. Thus, when the user scrolls, our reference viewport rect scrolls as well. I think this would be much more technically challenging, as weighting invalidations (or whatever we instrument) during a scroll could be difficult.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/loading-dev/CANMdWTvwn3NH-5VzwAd80bPNtv_cNdihvJtLEKmtjmA63JLPnA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/loading-dev/CADjAqN48M4T3cKABYYrQZzQBE-EAfNzDTyxpo8Fwn-f5YLNRBA%40mail.gmail.com.