<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&#64;igalia.com" title="Carlos Garcia Campos &lt;cgarcia&#64;igalia.com&gt;"> <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">&gt; Comment on <span class=""><a href="attachment.cgi?id=262588&amp;action=diff" name="attach_262588" title="Updated patch">attachment 262588</a> <a href="attachment.cgi?id=262588&amp;action=edit" title="Updated patch">[details]</a></span>
&gt; Updated patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=262588&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=262588&amp;action=review</a>
&gt; 
&gt; I like the approach in general.
&gt; 
&gt; &gt; Source/WebKit2/WebProcess/WebProcess.cpp:1462
&gt; &gt; +    if (!usesNetworkProcess()) {
&gt; 
&gt; I think it should be factored so that we only to the usesNetworkProcess() is
&gt; ENABLE(NETWORK_PROCESS) is true.
&gt; 
&gt; e.g.
&gt; #if ENABLE(NETWORK_PROCESS)
&gt;     if (usesNetworkProcess()) {
&gt;         // do stuff
&gt;         return;
&gt;     }
&gt; #endif
&gt;     WebCore::prefetchDNS(hostname);</span >

Sure!

<span class="quote">&gt; &gt; Source/WebKit2/WebProcess/WebProcess.cpp:1473
&gt; &gt; +    static const double dnsPrefetchedHostsCleanupDelay = 5;
&gt; 
&gt; I believe we prefer the following pattern now:
&gt; const auto dnsPrefetchedHostsCleanupDelay = 5_s;
&gt; 
&gt; &gt; Source/WebKit2/WebProcess/WebProcess.cpp:1474
&gt; &gt; +    m_dnsPrefetchedHostsCleanupTimer.stop();
&gt; 
&gt; 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">&gt; &gt; Source/WebKit2/WebProcess/WebProcess.h:220
&gt; &gt; +    void didPrefetchDNS(const String&amp;);
&gt; 
&gt; Where is this implemented?</span >

Leftovers from previous iteration.

<span class="quote">&gt; &gt; Source/WebKit2/WebProcess/WebProcess.h:221
&gt; &gt; +    void initializeDNSPrefetchedHosts(const Vector&lt;String&gt;&amp;);
&gt; 
&gt; ditto.</span >

Ditto.

<span class="quote">&gt; &gt; Source/WebKit2/WebProcess/WebProcess.h:370
&gt; &gt; +    WebCore::Timer m_dnsPrefetchedHostsCleanupTimer;
&gt; 
&gt; 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>