ben@newrelic.com
2013-Mar-22 17:19 UTC
Getting Turbolinks measurements that include load time for sub-resources
(Originally from https://github.com/steveklabnik/turbolinks_test/issues/4, where Steve suggested I post here instead) Something''s been bugging me with regards to measuring Turbolinks performance. I''m interested mainly in the capture of page loading time via browser instrumentation ''in the wild'', but I think the issue applies just as much to offline measurement. For a normal page load, the ''load'' event is not fired (from my understanding) until the top-level resource and all of its critical sub-resources are actually loaded (including, for example, images embedded in the page body). For a page load via Turbolinks, there doesn''t appear to be an equivalent event to hook. The ''page:load'' event emitted by Turbolinks is not sufficient for this purpose, because it fires before the critical sub-resources of the newly swapped-in body are loaded. Some experimentation in Chrome suggests that new ''load'' events are not fired on window or on the new body element, and I don''t really know where else to look. Does anyone have any suggestions as to how to place a finish line on Turbolinks testing that''s analagous to the traditional DOM load event, or other approaches to capture the time needed to load sub-resources referenced from the new body? Thanks! Ben -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.