W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: [IndexedDB] setVersion blocked on uncollected garbage IDBDatabases

From: Drew Wilson <atwilson@google.com>
Date: Wed, 9 Feb 2011 17:42:18 -0800
Message-ID: <AANLkTikpxPaW3J-nN7=YiQvjOjE1CzQmnvNNK7pKfYU8@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: Jonas Sicking <jonas@sicking.cc>, Jeremy Orlow <jorlow@chromium.org>, ben turner <bent.mozilla@gmail.com>, Joćo Eiras <joao.eiras@gmail.com>, public-webapps <public-webapps@w3.org>
On Wed, Feb 9, 2011 at 5:26 PM, Glenn Maynard <glenn@zewt.org> wrote
> On a related note, please see this statement from section 5.5 of the
>> MessagePort spec:
>> Authors are strongly encouraged to explicitly close MessagePort<http://dev.w3.org/html5/postmsg/#messageport> objects
>> to disentangle them, so that their resources can be recollected. Creating
>> many MessagePort <http://dev.w3.org/html5/postmsg/#messageport> objects
>> and discarding them without closing them can lead to high memory usage.
> For explicitly-created MessagePorts this is natural enough.  It's slightly
> less obvious for MessagePorts created implicitly by Worker/SharedWorker
> objects, though; I'd predict that becoming a common cause of leaks on pages
> that create and destroy a lot of threads.

It's not an issue, because when a Worker shuts down it implicitly closes all
of its MessagePorts, which would allow the renderer side to be GC'd - the
leak only happens when you release a reference to a MessagePort without
closing it. If you're creating lots of worker threads and leaving them
running, then you've got bigger memory issues than a few hundred bytes of

But, yeah, back to IDB now :)
Received on Thursday, 10 February 2011 01:42:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:16 UTC