[webkit-reviews] review granted: [Bug 174111] [WK2] ResourceLoadStatistics should batch its writes : [Attachment 314726] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 6 09:35:49 PDT 2017


Chris Dumez <cdumez at apple.com> has granted Brent Fulgham
<bfulgham at webkit.org>'s request for review:
Bug 174111: [WK2] ResourceLoadStatistics should batch its writes
https://bugs.webkit.org/show_bug.cgi?id=174111

Attachment 314726: Patch

https://bugs.webkit.org/attachment.cgi?id=314726&action=review




--- Comment #10 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 314726
  --> https://bugs.webkit.org/attachment.cgi?id=314726
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=314726&action=review

r=me with changes.

> Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp:40
> +#include <WebCore/Timer.h>

This does not look needed. Also, we should never be using a WebCore Timer in
the UIProcess.

> Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp:376
> +	       Seconds delayUntil = minimumStatisticsFileWriteInterval -
timeSinceLastWrite + 1_s;

Why the  + 1_s ?

> Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp:377
> +	       m_statisticsQueue->dispatchAfter(delayUntil, [this] {

I would capture protectedThis here.

> Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp:380
> +	       m_doesHaveDelayedWrite = true;

Can we move this before the dispatch just to nbc on the safe side?

> Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp:398
> +    m_doesHaveDelayedWrite = false;

What would you think of m_didScheduleWrite ?


More information about the webkit-reviews mailing list