WICG / frame-timing

Frame Timing API
https://wicg.github.io/frame-timing/
Other
170 stars 18 forks source link

Interface and event naming #12

Closed igrigorik closed 9 years ago

igrigorik commented 10 years ago

At TPAC, Simon (Apple) mentioned that...

That said, we didn't come up with any better names at TPAC either. Thoughts, suggestions?

paullewis commented 10 years ago

Can Main become UI or Renderer? That's what it's called on other platforms, i.e. RendererFrame

For the composite timing name issue, how about following the model from the Navigation Timing API and having distinct events:

Might be bonkers.

paullewis commented 10 years ago

Wait, that would need to be an array....

performance.frames[0].rendererStart etc.

igrigorik commented 10 years ago

@paullewis my understanding is that we can have multiple composite events associated with a single main frame event. As a result, we need to separate them out and use frameNumber for tracking the relationships.

That aside... I like RendererFrame, except do we need Frame part at all? What if it was simplified it to PerformanceRendererTiming, PerformanceCompositeTiming?

/cc @mpb @natduca

mithro commented 9 years ago

@paullewis You can definitely have multiple composite events associated with a single main frame event and that is the reason why we need the sourceFrameNumber attribute (Issue #7 included a discussion about the topic.)

I personally don't really have any strong preference with having Frame in the name. My only two thoughts were;

igrigorik commented 9 years ago

Do we have any alternative ideas for CompositeTiming?

mpb commented 9 years ago

UITiming, CompositeTiming and DrawTiming are the three I can think of. They all have issues though. Composite sounds like the front runner.

On Nov 10, 2014, at 9:14 PM, Ilya Grigorik notifications@github.com wrote:

Do we have any alternative ideas for CompositeTiming?

— Reply to this email directly or view it on GitHub.

mithro commented 9 years ago

I came up with the following ideas; AsynchronousFrameTiming, OffThreadFrameTiming, ExternalFrameTiming but don't really like any of them.

PerformanceSynchronousRenderingFrameTiming and PerformanceAsynchronousRenderingFrameTiming is a pretty huge mouthful.

paullewis commented 9 years ago

I think we should roll with PerformanceRendererTiming and PerformanceCompositeTiming. A bit of a dumb question: would you get a hold of them like this?

var rendererEvents = window.performance.getEntriesByType("renderer");
var compositeThreadEvents = window.performance.getEntriesByType("composite");

If so, rad. If not, how?

mpb commented 9 years ago

SGTM. Yes, that's how you get access to them!

Sent from my iPhone

On Nov 11, 2014, at 7:21 AM, Paul Lewis notifications@github.com wrote:

I think we should roll with PerformanceRendererTiming and PerformanceCompositeTiming. A bit of a dumb question: would you get a hold of them like this?

var rendererEvents = window.performance.getEntriesByType("renderer"); var compositeThreadEvents = window.performance.getEntriesByType("composite"); If so, rad. If not, how?

— Reply to this email directly or view it on GitHub.

igrigorik commented 9 years ago

+1 to RenderTiming and CompositeTiming.. if someone comes up with a better name for the latter, we can revisit later.

paullewis commented 9 years ago

So removing the Performance bit from the front? I'm cool with that.

igrigorik commented 9 years ago

Doh, sorry.. No, I was lazy and didn't type it out. Performance bit should be there:

igrigorik commented 9 years ago

@paullewis @mpb take a look at: https://github.com/w3c/frame-timing/commit/562c53001fa74e54e9a830091ac25fd554adca2c

Note that it's currently PerformanceRenderTiming not PerformanceRendererTiming... The former is shorter and consistent with PerformanceCompositeTiming. That said, if we want Renderer, then we should probably also update Composite to Compositor to be consistent.

WDYT? Personally, I'm good with Render and Composite.

paullewis commented 9 years ago

I'm fine with Render and Composite personally.

mpb commented 9 years ago

SGTM