Last modified: 2014-10-17 11:42:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T67111, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65111 - Log first paint time
Log first paint time
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
NavigationTiming (Other open bugs)
unspecified
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: performance
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-10 02:30 UTC by Ori Livneh
Modified: 2014-10-17 11:42 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Ori Livneh 2014-05-10 02:30:14 UTC
Gergő Tisza suggested looking at chrome.loadTimes(), a nonstandard API that contains some interesting bits of data -- especially first paint time. We should log it.
Comment 1 Tisza Gergő 2014-05-11 01:37:11 UTC
Compared the results of loadTimes() with the standard navigation API by running

$.each( performance.timing, function( key, val ) { if ( typeof( val ) === 'number' ) console.log( key, val - performance.timing.navigationStart ) } );
$.each( chrome.loadTimes(), function( key, val ) { if ( typeof( val ) === 'number' ) console.log( key, val * 1000 - performance.timing.navigationStart ) } );

- requestTime corresponds to navigationStart (with a few ms difference)
- startLoadTime is connectStart
- commitLoadTime is domLoading
- finishDocumentLoadingTime is domContentLoadedEventStart (or ...End, doesn't seem to be any difference)
- finishLoadTime is loadEventEnd (again, with a few ms difference)

That leaves firstPaintTime and firstPaintAfterLoadTime. firstPaintTime comes after domLoading, but well before domInteractive/domContentLoaded*. On a vagrant box with just a few extensions, it comes 100ms after domLoading; on enwiki, the difference is 250ms. If it shows what its name suggests, it might be a good way of measuring the delay caused by head scripts.

firstPaintAfterLoadTime follows loadEventEnd closely (probably too closely to be interesting - 5ms on plain vagrant, 50ms on enwiki). There is no data for first paint time after domcontentloaded, which would have been more interesting.

Of the non-numeric fields, most are SPDY/NPN related. navigationType is similar to performance.navigation.type, but judging from the source code ( https://src.chromium.org/svn/trunk/src/chrome/renderer/loadtimes_extension_bindings.cc ) it has more values: link clicked / form submitted / form resubmitted / history / reload. Not useful since logging is disabled for most of these anyway.

So firstPaintTime and maybe firstPaintAfterLoadTime seem to be the only useful ones.
Comment 2 Tisza Gergő 2014-05-11 01:57:05 UTC
An interesting post about first paint vs onload and the shortcomings of both:
http://calendar.perfplanet.com/2012/moving-beyond-window-onload/

Also, while looking for a description of chrome.loadTimes() (which does not seem to exist - pretty much the on), I found this tool, which seems to be pretty cool:
http://www.lognormal.com/boomerang/doc/

The developers of boomerang also wrote an article about how to measure paint timing on other browsers: http://webcache.googleusercontent.com/search?q=cache:www.lognormal.com/blog/2013/11/11/calculating-first-paint/
Comment 3 Gerrit Notification Bot 2014-05-11 02:03:39 UTC
Change 132764 had a related patch set uploaded by Gergő Tisza:
Log paint times

https://gerrit.wikimedia.org/r/132764
Comment 4 Gerrit Notification Bot 2014-08-28 07:15:56 UTC
Change 132764 merged by jenkins-bot:
Log time of first paint and first paint after onload event

https://gerrit.wikimedia.org/r/132764
Comment 5 Andre Klapper 2014-10-17 11:42:31 UTC
(In reply to Gerrit Notification Bot from comment #4)
> Change 132764 merged by jenkins-bot:
> Log time of first paint and first paint after onload event
> 
> https://gerrit.wikimedia.org/r/132764


Patch was merged - assuming this bug is FIXED. If that is not the case: Please reopen and elaborate what is left to do here to get this report fixed.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links