- From: Jonas Sicking <jonas@sicking.cc>
- Date: Wed, 17 Jul 2013 10:28:26 -0700
- To: Jatinder Mann <jmann@microsoft.com>
- Cc: James Simonsen <simonjam@google.com>, public-web-perf <public-web-perf@w3.org>
For shared workers you can't make it show up in the performance metrics for "the document" since a shared worker doesn't have a lifetime connected to any particular document. Shared workers essentially are stand-alone documents that are running off the main thread in a UI-less context. Dedicated workers are always tied to the document that created them. They go away when the document goes away (I *think* that's the case even when MessageChannels are in play, but the spec doesn't spell it out clearly). So you *could* consider dedicated workers as part of their owning document. But you could also keep them consistent with shared workers and make them create a new context. / Jonas On Wed, Jul 17, 2013 at 9:51 AM, Jatinder Mann <jmann@microsoft.com> wrote: > I agree that we should consider adding Web Worker support in the Resource > Timing L2 spec. > > > > For web workers, we need to decide whether the resources downloaded by the > web worker should show up in the main document associated with the worker, > or only when the buffer is requested from the web worker context though the > performance.getEntries() methods. The opposite is also interesting, should > the resources used in the main document by shown when calling > performance.getEntries() methods from the worker context? Sounds like an > interesting use case. > > > > If we decide to show the data in the main documents associated with the > worker, we’ll need to consider if we want to overload initiatorType with > ‘worker’ or come up with a new attribute to describe where the request came > from. There’s also the detail on which documents we should associate with a > shared worker (all documents?). If we decide to only show the data in the > worker context, I don’t think we need to worry about those details. > > > > As for the script being used by the worker, seems like the initiator here > would really be the script element on the main document. > > > > There’s also the bit on adding the > performance.getEntries/getEntriesByType/getEntriesByName functions to the > web worker context. I think we should definitely make that change. > > > > We should discuss in the conference call in which direction we are leaning. > I can make spec changes accordingly. > > > > Thanks, > > Jatinder > > > > From: James Simonsen [mailto:simonjam@google.com] > Sent: Wednesday, July 10, 2013 5:47 PM > To: public-web-perf > Subject: [Resource Timing] Web worker initiatorType? > > > > Earlier, we decided to punt Web Worker support to a level 2 spec. [1] We > were mainly talking about resource downloaded inside the worker, like XHRs. > > > > What about the worker itself? Its script is actually fetched by the main > document, so it seems like it should show up in the buffer and have a > "worker" initiatorType. WDYT? > > > > James > > > > [1] http://lists.w3.org/Archives/Public/public-web-perf/2012Jun/0002.html
Received on Wednesday, 17 July 2013 17:29:25 UTC