[Webkit-unassigned] [Bug 184015] API::SharedJSContext caches its JSContext for at most one second

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 17 01:21:51 PDT 2018


--- Comment #10 from Saam Barati <sbarati at apple.com> ---
(In reply to Geoffrey Garen from comment #6)
> > > Keith / Saam, is there a reason SharedJSContext "expires" after one second?
> > 
> > I don't know of any reason.
> > 
> > Geoff, do you know?
> It looks like I asked for some limit on this cache in bug 146416. Given that
> a JS VM retains a bunch of memory, I think it's an important goal that a
> WKWebView client should be able to allocate a WebView, do some work with it,
> and then throw it away without retaining a JS VM forever.
> Here are some solutions that I think would be reasonable:
> (1) Make allocation of a JSContext faster than 16ms. (Jeepers!)
I like this idea.

> (2) Change API::SerializedScriptValue::deserialize to accept a WKWebView
> argument, and keep a weak reference to that argument, and clear its cache
> when the set of all WebViews that has ever called
> API::SerializedScriptValue::deserialize becomes empty.
> I think we should probably do both of these.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180817/630af0e8/attachment.html>

More information about the webkit-unassigned mailing list