Bug 189520 - [Curl] Limit capturing extra metrics for Web Inspector when not required.
Summary: [Curl] Limit capturing extra metrics for Web Inspector when not required.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Basuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-09-11 14:05 PDT by Basuke Suzuki
Modified: 2018-09-18 14:53 PDT (History)
6 users (show)

See Also:


Attachments
PATCH (10.02 KB, patch)
2018-09-17 10:50 PDT, Basuke Suzuki
achristensen: review-
Details | Formatted Diff | Diff
PATCH (12.99 KB, patch)
2018-09-17 15:54 PDT, Basuke Suzuki
achristensen: review+
Details | Formatted Diff | Diff
PATCH (13.10 KB, patch)
2018-09-18 14:13 PDT, Basuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Basuke Suzuki 2018-09-11 14:05:27 PDT
Respect the value of NetworkDataTask::shouldCaptureExtraNetworkLoadMetrics() to reduce the process time when they are not needed.
Comment 1 Basuke Suzuki 2018-09-17 10:50:41 PDT
Created attachment 349903 [details]
PATCH
Comment 2 Alex Christensen 2018-09-17 13:47:35 PDT
Comment on attachment 349903 [details]
PATCH

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

> Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp:140
> +    auto curlRequest = CurlRequest::create(request, *this, CurlRequest::ShouldSuspend::Yes);
> +    curlRequest->setCaptureExtraNetworkLoadMetricsEnabled(shouldCaptureExtraNetworkLoadMetrics());

This should be a constructor parameter.  If it's annoying use a default value.
Comment 3 Basuke Suzuki 2018-09-17 15:54:01 PDT
Created attachment 349959 [details]
PATCH

Thanks for the review. I remove setter and move that to the constructor argument.
Comment 4 Alex Christensen 2018-09-17 16:09:40 PDT
Comment on attachment 349959 [details]
PATCH

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

> Source/WebCore/platform/network/curl/CurlRequest.h:112
> +    CurlRequest(const ResourceRequest&, CurlRequestClient*, bool shouldSuspend, bool enableMultipart, bool captureExtendedMetrics, MessageQueue<Function<void()>>*);

It would be more readable to just pass the enums here, too.
Comment 5 Basuke Suzuki 2018-09-18 14:13:48 PDT
Created attachment 350053 [details]
PATCH
Comment 6 Basuke Suzuki 2018-09-18 14:15:16 PDT
Comment on attachment 350053 [details]
PATCH

Sorry, I've submitted a different patch file. This one is the right one.
Comment 7 WebKit Commit Bot 2018-09-18 14:52:18 PDT
Comment on attachment 350053 [details]
PATCH

Clearing flags on attachment: 350053

Committed r236156: <https://trac.webkit.org/changeset/236156>
Comment 8 WebKit Commit Bot 2018-09-18 14:52:19 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2018-09-18 14:53:30 PDT
<rdar://problem/44577426>