W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2014

Re: Move sync APIs out of "Worker" into "SyncWorker"

From: Jake Archibald <jaffathecake@gmail.com>
Date: Tue, 29 Jul 2014 20:00:17 +0100
Message-ID: <CAJ5xic_ZEb4dXK-W15KAY+a5D+KgQMa82iHzn0+uTP8z=dq_aA@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: Alex Russell <slightlyoff@google.com>, public-script-coord <public-script-coord@w3.org>
New tabs using that ServiceWorker may be open or may open while you're
blocking. Baaaaad slowwww baaaad.
On 29 Jul 2014 19:36, "Ian Hickson" <ian@hixie.ch> wrote:

> On Tue, 29 Jul 2014, Jake Archibald wrote:
> > On 29 July 2014 19:24, Ian Hickson <ian@hixie.ch> wrote:
> > > On Tue, 29 Jul 2014, Jake Archibald wrote:
> > > >
> > > > Over in ServiceWorker we want to get all of the APIs available to
> > > > workers (FormData, indexeddb, URL etc), but not the synchronous
> > > > interfaces such as
> > > > http://dev.w3.org/2006/webapi/FileAPI/#readingOnThreads
> > >
> > > Why not the synchronous APIs?
> >
> > ServiceWorker needs to be able to handle all of the fetches of a page
> > load, for instance. Sync APIs result in loading them in series. There's
> > never a good reason to be using a sync API in ServiceWorker.
>
> Sure there is. If you know you're only going to get one request, and that
> request is for the data in the local database, then you just get the data
> and return it.
>
> Are you also going to ban long-running scripts in service workers, the way
> we do for the main thread?
>
> --
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
>
Received on Tuesday, 29 July 2014 19:00:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:22 UTC