[Webkit-unassigned] [Bug 147824] NetworkProcess: DNS prefetch happens in the Web Process

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 19 00:17:15 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=147824

--- Comment #22 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to comment #20)
> Comment on attachment 262588 [details]
> Updated patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=262588&action=review
> 
> I like the approach in general.
> 
> > Source/WebKit2/WebProcess/WebProcess.cpp:1462
> > +    if (!usesNetworkProcess()) {
> 
> I think it should be factored so that we only to the usesNetworkProcess() is
> ENABLE(NETWORK_PROCESS) is true.
> 
> e.g.
> #if ENABLE(NETWORK_PROCESS)
>     if (usesNetworkProcess()) {
>         // do stuff
>         return;
>     }
> #endif
>     WebCore::prefetchDNS(hostname);

Sure!

> > Source/WebKit2/WebProcess/WebProcess.cpp:1473
> > +    static const double dnsPrefetchedHostsCleanupDelay = 5;
> 
> I believe we prefer the following pattern now:
> const auto dnsPrefetchedHostsCleanupDelay = 5_s;
> 
> > Source/WebKit2/WebProcess/WebProcess.cpp:1474
> > +    m_dnsPrefetchedHostsCleanupTimer.stop();
> 
> Using a hysteresis activity, these 2 lines would become a call to impulse().

Ah, I didn't know HysteresisActivity class, it seems fit well here.

> > Source/WebKit2/WebProcess/WebProcess.h:220
> > +    void didPrefetchDNS(const String&);
> 
> Where is this implemented?

Leftovers from previous iteration.

> > Source/WebKit2/WebProcess/WebProcess.h:221
> > +    void initializeDNSPrefetchedHosts(const Vector<String>&);
> 
> ditto.

Ditto.

> > Source/WebKit2/WebProcess/WebProcess.h:370
> > +    WebCore::Timer m_dnsPrefetchedHostsCleanupTimer;
> 
> Seems like a good use for HysteresisActivity instead of Timer.

Indeed, thanks.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151019/e0067407/attachment-0001.html>


More information about the webkit-unassigned mailing list