W3C home > Mailing lists > Public > public-web-perf@w3.org > July 2012

RE: [User Timing] Integration with Performance Timeline

From: Jatinder Mann <jmann@microsoft.com>
Date: Wed, 11 Jul 2012 16:41:45 +0000
To: James Simonsen <simonjam@chromium.org>
CC: "Deng, Pan" <pan.deng@intel.com>, public-web-perf <public-web-perf@w3.org>
Message-ID: <AE5FFD9402CD4F4785E812F2C9929D650E3BB572@SN2PRD0310MB383.namprd03.prod.outlook.com>
I disagree with the notion that we should only use the generalized API surface (e.g., getEntries, getEntriesByType, getEntriesByName) and not allow any specific methods to be defined for a particular metric. We should continue to evangelize the generalized APIs if we want web developers to focus on them, but that doesn't mean we shouldn't add specialized APIs.

As an example, Resource Timing already has its own set of APIs specific to its needs (e.g., clearResourceTimings, setResourceTimingBufferSize, onresourcetimingbufferfull).

User Timing is also fundamentally different from Resource Timing in that Resource Timing implicitly captures data (e.g.,  all resources are opted-in by default) whereas a developer explicitly needs to opt-in (e.g., use mark(), measure()) in order to use User Timing to capture data. The key benefit I see of getMarks/getMeasures is that it provides just the filtered User Timing data in JSON notation without the overhead of the objects in the order that the marks and measures were called. Considering a developer may only be interested in this information and considering users on metered networks, the option of sending just the right filtered data seems like a positive feature.

Also, performance.now() doesn't replace getMarks and getMeasures. getMarks/getMeasures continue to provide a standardized and interoperable way to collect your filtered mark/measure data in JSON format.

When we had made the changes to add the Performance Timeline overhead to each spec, we had at that time discussed and decided to leave these APIs in. The spec has been stable for quite some time, these APIs don't break any WebIDL rules, they give value of providing specialized functionality, even with them in we can continue to evangelize the generalized API surface, why change it now?

Thanks,
Jatinder
Received on Wednesday, 11 July 2012 16:43:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:33 UTC