Intent to Deprecate and Remove: SharedWorker.workerStart

ยอดดู 155 ครั้ง
ข้ามไปที่ข้อความที่ยังไม่อ่านรายการแรก

Nicolás Peña

ยังไม่อ่าน,
19 ก.ค. 2560 10:57:3719/7/60
ถึง blin...@chromium.org

Primary eng: n...@chromium.org

Spec: igrig...@chromium.org


Summary

Remove SharedWorker.workerStart because it has been deprecated and is not used. SharedWorkerPerformance.idl can then be removed.


Motivation

We want to be up-to-date with respect to the spec. There is another attribute with the same name: PerformanceResourceTiming.workerStart. Removing the deprecated one reduces confusion. The current spec has a replacement for the deprecated one: performance.timeOrigin.


Interoperability and Compatibility Risk

Edge: not supported

Firefox: not supported (they have performance.timeOrigin)

Safari:not supported


Alternative implementation suggestion for web developers

performance.timeOrigin can be used as a replacement. This needs to be implemented in Chrome: see bug.


Usage information from UseCounter

Usage has been 0.000000 at least since August 26, 2015: https://www.chromestatus.com/metrics/feature/timeline/popularity/885


OWP launch tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=745981  


Entry on the feature dashboard

https://www.chromestatus.com/feature/5652075467767808


Rick Byers

ยังไม่อ่าน,
19 ก.ค. 2560 11:24:4119/7/60
ถึง Nicolás Peña, blink-dev, Hiroki Nakagawa
Removing zero-usage chrome-only APIs is always a great thing to do - thank you!

But have you verified that you can trigger the UseCounter from a test case?  I know the UseCounter tracking for workers is rather complex (needs to delegate up through the browser process and down to an appropriate renderer), so when the value says absolutely zero like this, we should be a little skeptical on whether or not it's actually getting recorded properly.  I'd suggest creating a simple test page and verifying that after you run it (on current Chrome stable release) that you see an entry in chrome://histograms/Blink.UseCounter.Features for bucket 885.  /cc nhiroki@ who implemented the counter support for workers.

If you can prove that the counter is actually functioning, then LGTM1 (I'll be out until Monday).

Rick



--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAATDinr1UbSpXwOm6s%2BxpKQicB5Rs79pxPhGQudu8N-4BqOYA%40mail.gmail.com.

n...@chromium.org

ยังไม่อ่าน,
19 ก.ค. 2560 12:21:0419/7/60
ถึง blink-dev, n...@google.com, nhi...@chromium.org
If I open an html file with this

<script>
var worker = new SharedWorker('');
var s = worker.workerStart;
</script>

on Stable (with --allow-file-access-from-files), bucket 885's counter increases.

Rick Byers

ยังไม่อ่าน,
19 ก.ค. 2560 13:57:3819/7/60
ถึง n...@chromium.org, blink-dev, Nicolás Peña, Hiroki Nakagawa
Oh I'm sorry, I was thinking this was an API access from within the worker script.  Obviously that's wrong (SharedWorker is the object available in the main world, so this is just our tried-and-tested common use case).  Anyway thanks for double-checking (we've had cases of absolute 0 before which were bugs, it's rare to have an API without at least a tiny bit of usage).

LGTM1 to remove without a deprecation period (being Chrome-only and absolute zero reported usage, there is virtually zero compat risk here IMHO).  Following the normal path of deprecating in Chrome for one milestone and then removing is also OK with me if you prefer.

Rick

Chris Harrelson

ยังไม่อ่าน,
20 ก.ค. 2560 14:13:2920/7/60
ถึง Rick Byers, n...@chromium.org, blink-dev, Nicolás Peña, Hiroki Nakagawa
LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFUtAY873tddUPbx83VP6RPK9vaDmKyro-bYdRgaCxPMmFSMpA%40mail.gmail.com.

Dimitri Glazkov

ยังไม่อ่าน,
21 ก.ค. 2560 10:31:2221/7/60
ถึง Chris Harrelson, Rick Byers, n...@chromium.org, blink-dev, Nicolás Peña, Hiroki Nakagawa
LGTM3

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.

PhistucK

ยังไม่อ่าน,
21 ก.ค. 2560 10:36:1621/7/60
ถึง Nicolás Peña, blink-dev
> performance.timeOrigin can be used as a replacement. This needs to be implemented in Chrome: see bug.

No, it cannot be used as a replacement, because it is not implemented in Chrome (like you mention).
Can you suggest an alternative code that gets the same result as SharedWorker.prototype.workerStart?


PhistucK

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

n...@chromium.org

ยังไม่อ่าน,
21 ก.ค. 2560 13:45:3621/7/60
ถึง blink-dev, n...@google.com, Ilya Grigorik
The commit removing translateTime (the initial replacement for workerStart) from the spec has some insight: https://github.com/w3c/hr-time/pull/31/commits/b33c9c7689ef83571c09874b2a368305775037d6

I don't think there is an exact replacement for it, but I'm not worried about it because there was no usage (especially because it was never implemented in other main browsers). If we want to be on the safe side, we could deprecate and only remove until we have shipped timeOrigin.

PhistucK

ยังไม่อ่าน,
21 ก.ค. 2560 13:49:3021/7/60
ถึง n...@chromium.org, blink-dev, Nicolás Peña, Ilya Grigorik
Naa, the usage is zero, I would not hold on until the replacement is implemented.
I was just hoping that the alternative section would say more than "use this (but it is not implemented)". :)


PhistucK

ตอบทุกคน
ตอบกลับผู้สร้าง
ส่งต่อ
ข้อความใหม่ 0 รายการ