[UserTiming] Spec review

Methods and Exceptions
need links to and tests for general exceptions

mark, measure method
- why doesn't this return the timing information being stored, it might be  
of immediate interest?

Why are we throwing syntax errors on measure if a calculation in the  
measure method is negative, or a value is 0? Those are hardly syntactical  
errors. I am not convinced that throwing at all in those cases is optimal,  
this would lead to developers always wrapping the measures method inside  
either conditionals, or more likely try/catch clauses. Particularily the  
latter is quite slow, and would lead to developers slowing down their code  
when they actually wanted to speed it up. Would a better way be to always  
store e.g. "-1" in those cases, and let any analytics scripts (which are  
presumably less time-critical) deal with the errors instead? I am not sure  
why we need to handle such cases exceptionally at all, sorry if I have  
missed that discussion.

The text is hard to understand, and can do with a rewrite. Who is to  
ensure the information is only available to the server, does this mean  
javascript cannot send it off to another server for analysis there? What  
is the root document, the top level document, or the cross-origin iframe  
where the measurements are made? Standard nomenclature is normally  
"origin", not "domain" or "server".

Wording improvements
"If both the startMark and endMark arguments are not" => "If neither ...  
nor ... is"

Vendor prefixes and monotonic clock - uses slightly different language and  
markup than other specs.

Sigbjørn Vik
Core Quality Services
Opera Software

Received on Monday, 14 November 2011 08:30:20 UTC