<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - NetworkProcess: DNS prefetch happens in the Web Process"
href="https://bugs.webkit.org/show_bug.cgi?id=147824#c22">Comment # 22</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - NetworkProcess: DNS prefetch happens in the Web Process"
href="https://bugs.webkit.org/show_bug.cgi?id=147824">bug 147824</a>
from <span class="vcard"><a class="email" href="mailto:cgarcia@igalia.com" title="Carlos Garcia Campos <cgarcia@igalia.com>"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=147824#c20">comment #20</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=262588&action=diff" name="attach_262588" title="Updated patch">attachment 262588</a> <a href="attachment.cgi?id=262588&action=edit" title="Updated patch">[details]</a></span>
> Updated patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=262588&action=review">https://bugs.webkit.org/attachment.cgi?id=262588&action=review</a>
>
> 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);</span >
Sure!
<span class="quote">> > 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().</span >
Ah, I didn't know HysteresisActivity class, it seems fit well here.
<span class="quote">> > Source/WebKit2/WebProcess/WebProcess.h:220
> > + void didPrefetchDNS(const String&);
>
> Where is this implemented?</span >
Leftovers from previous iteration.
<span class="quote">> > Source/WebKit2/WebProcess/WebProcess.h:221
> > + void initializeDNSPrefetchedHosts(const Vector<String>&);
>
> ditto.</span >
Ditto.
<span class="quote">> > Source/WebKit2/WebProcess/WebProcess.h:370
> > + WebCore::Timer m_dnsPrefetchedHostsCleanupTimer;
>
> Seems like a good use for HysteresisActivity instead of Timer.</span >
Indeed, thanks.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>