Bug 187460

Summary: ResourceResponseBase wastes a lot of space because of std::optional<>
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: Basuke.Suzuki, beidson, cdumez, cgarcia, dbates, esprehn+autocc, ews-watchlist, fred.wang, galpeter, hi, Hironori.Fujii, japhet, joepeck, kangil.han, rbuis, rniwa, simon.fraser, ysuzuki
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 189231    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from ews101 for mac-highsierra
none
Archive of layout-test-results from ews104 for mac-highsierra-wk2
none
Archive of layout-test-results from ews112 for mac-highsierra
none
Patch
none
Patch
none
Archive of layout-test-results from ews103 for mac-highsierra
none
Archive of layout-test-results from ews106 for mac-highsierra-wk2
none
Archive of layout-test-results from ews115 for mac-highsierra
none
Archive of layout-test-results from ews210 for win-future
none
Archive of layout-test-results from ews125 for ios-simulator-wk2
none
Patch
none
Archive of layout-test-results from ews103 for mac-highsierra
none
Archive of layout-test-results from ews107 for mac-highsierra-wk2
none
Archive of layout-test-results from ews115 for mac-highsierra
none
Pach
none
Patch
none
Archive of layout-test-results from ews101 for mac-highsierra
none
Archive of layout-test-results from ews104 for mac-highsierra-wk2
none
Archive of layout-test-results from ews112 for mac-highsierra
none
Archive of layout-test-results from ews126 for ios-simulator-wk2
none
Patch
none
Archive of layout-test-results from ews104 for mac-highsierra-wk2
none
Patch
none
Patch none

Description Simon Fraser (smfr) 2018-07-08 22:34:29 PDT
ResourceResponseBase layout looks like:

 45$ $ ./Tools/Scripts/dump-class-layout -c Release WebCore ResourceResponseBase
  +0 <568> ResourceResponseBase
  +0 < 48>     WebCore::URL m_url
  +0 <  8>         WTF::String m_string
  +0 <  8>             WTF::RefPtr<WTF::StringImpl, WTF::DumbPtrTraits<WTF::StringImpl> > m_impl
  +0 <  8>               WTF::DumbPtrTraits<WTF::StringImpl>::StorageType m_ptr
  +8 <  1>       bool m_isValid : 1
  +8 <  1>       bool m_protocolIsInHTTPFamily : 1
  +8 <  1>       bool m_cannotBeABaseURL : 1
  +8 <  1>       <PADDING BITS: 5 bits>
  +9 <  3>       <PADDING: 3 bytes>
 +12 <  4>       unsigned int m_schemeEnd
 +16 <  4>       unsigned int m_userStart
 +20 <  4>       unsigned int m_userEnd
 +24 <  4>       unsigned int m_passwordEnd
 +28 <  4>       unsigned int m_hostEnd
 +32 <  4>       unsigned int m_portEnd
 +36 <  4>       unsigned int m_pathAfterLastSlash
 +40 <  4>       unsigned int m_pathEnd
 +44 <  4>       unsigned int m_queryEnd
 +48 <  8>     WTF::AtomicString m_mimeType
 +48 <  8>         WTF::String m_string
 +48 <  8>             WTF::RefPtr<WTF::StringImpl, WTF::DumbPtrTraits<WTF::StringImpl> > m_impl
 +48 <  8>               WTF::DumbPtrTraits<WTF::StringImpl>::StorageType m_ptr
 +56 <  8>   long long m_expectedContentLength
 +64 <  8>     WTF::AtomicString m_textEncodingName
 +64 <  8>         WTF::String m_string
 +64 <  8>             WTF::RefPtr<WTF::StringImpl, WTF::DumbPtrTraits<WTF::StringImpl> > m_impl
 +64 <  8>               WTF::DumbPtrTraits<WTF::StringImpl>::StorageType m_ptr
 +72 <  8>     WTF::AtomicString m_httpStatusText
 +72 <  8>         WTF::String m_string
 +72 <  8>             WTF::RefPtr<WTF::StringImpl, WTF::DumbPtrTraits<WTF::StringImpl> > m_impl
 +72 <  8>               WTF::DumbPtrTraits<WTF::StringImpl>::StorageType m_ptr
 +80 <  8>     WTF::AtomicString m_httpVersion
 +80 <  8>         WTF::String m_string
 +80 <  8>             WTF::RefPtr<WTF::StringImpl, WTF::DumbPtrTraits<WTF::StringImpl> > m_impl
 +80 <  8>               WTF::DumbPtrTraits<WTF::StringImpl>::StorageType m_ptr
 +88 < 32>     WebCore::HTTPHeaderMap m_httpHeaderFields
 +88 < 16>         WebCore::HTTPHeaderMap::CommonHeadersVector m_commonHeaders
 +88 < 16>             WTF::VectorBuffer<WebCore::HTTPHeaderMap::CommonHeader, 0> WTF::VectorBuffer<WebCore::HTTPHeaderMap::CommonHeader, 0>
 +88 < 16>                 WTF::VectorBufferBase<WebCore::HTTPHeaderMap::CommonHeader> WTF::VectorBufferBase<WebCore::HTTPHeaderMap::CommonHeader>
 +88 <  8>                   WebCore::HTTPHeaderMap::CommonHeader * m_buffer
 +96 <  4>                   unsigned int m_capacity
+100 <  4>                   unsigned int m_size
+104 < 16>         WebCore::HTTPHeaderMap::UncommonHeadersVector m_uncommonHeaders
+104 < 16>             WTF::VectorBuffer<WebCore::HTTPHeaderMap::UncommonHeader, 0> WTF::VectorBuffer<WebCore::HTTPHeaderMap::UncommonHeader, 0>
+104 < 16>                 WTF::VectorBufferBase<WebCore::HTTPHeaderMap::UncommonHeader> WTF::VectorBufferBase<WebCore::HTTPHeaderMap::UncommonHeader>
+104 <  8>                   WebCore::HTTPHeaderMap::UncommonHeader * m_buffer
+112 <  4>                   unsigned int m_capacity
+116 <  4>                   unsigned int m_size
+120 <240>     WebCore::NetworkLoadMetrics m_networkLoadMetrics
+120 <  8>         WTF::Seconds domainLookupStart
+120 <  8>           double m_value
+128 <  8>         WTF::Seconds domainLookupEnd
+128 <  8>           double m_value
+136 <  8>         WTF::Seconds connectStart
+136 <  8>           double m_value
+144 <  8>         WTF::Seconds secureConnectionStart
+144 <  8>           double m_value
+152 <  8>         WTF::Seconds connectEnd
+152 <  8>           double m_value
+160 <  8>         WTF::Seconds requestStart
+160 <  8>           double m_value
+168 <  8>         WTF::Seconds responseStart
+168 <  8>           double m_value
+176 <  8>         WTF::Seconds responseEnd
+176 <  8>           double m_value
+184 <  1>       bool complete
+185 <  7>       <PADDING: 7 bytes>
+192 <  8>         WTF::String protocol
+192 <  8>             WTF::RefPtr<WTF::StringImpl, WTF::DumbPtrTraits<WTF::StringImpl> > m_impl
+192 <  8>               WTF::DumbPtrTraits<WTF::StringImpl>::StorageType m_ptr
+200 < 16>         std::optional<WTF::String> remoteAddress
+200 < 16>             std::OptionalBase<WTF::String> std::OptionalBase<WTF::String>
+200 <  1>               bool init_
+201 <  7>               <PADDING: 7 bytes>
+208 <  8>               std::storage_t<WTF::String> storage_
+216 < 16>         std::optional<WTF::String> connectionIdentifier
+216 < 16>             std::OptionalBase<WTF::String> std::OptionalBase<WTF::String>
+216 <  1>               bool init_
+217 <  7>               <PADDING: 7 bytes>
+224 <  8>               std::storage_t<WTF::String> storage_
+232 <  8>         std::optional<WebCore::NetworkLoadPriority> priority
+232 <  8>             std::OptionalBase<WebCore::NetworkLoadPriority> std::OptionalBase<WebCore::NetworkLoadPriority>
+232 <  1>               bool init_
+233 <  3>               <PADDING: 3 bytes>
+236 <  4>               std::constexpr_storage_t<WebCore::NetworkLoadPriority> storage_
+240 < 40>         std::optional<WebCore::HTTPHeaderMap> requestHeaders
+240 < 40>             std::OptionalBase<WebCore::HTTPHeaderMap> std::OptionalBase<WebCore::HTTPHeaderMap>
+240 <  1>               bool init_
+241 <  7>               <PADDING: 7 bytes>
+248 < 32>               std::storage_t<WebCore::HTTPHeaderMap> storage_
+280 < 16>         std::optional<unsigned long long> requestHeaderBytesSent
+280 < 16>             std::OptionalBase<unsigned long long> std::OptionalBase<unsigned long long>
+280 <  1>               bool init_
+281 <  7>               <PADDING: 7 bytes>
+288 <  8>               std::constexpr_storage_t<unsigned long long> storage_
+296 < 16>         std::optional<unsigned long long> requestBodyBytesSent
+296 < 16>             std::OptionalBase<unsigned long long> std::OptionalBase<unsigned long long>
+296 <  1>               bool init_
+297 <  7>               <PADDING: 7 bytes>
+304 <  8>               std::constexpr_storage_t<unsigned long long> storage_
+312 < 16>         std::optional<unsigned long long> responseHeaderBytesReceived
+312 < 16>             std::OptionalBase<unsigned long long> std::OptionalBase<unsigned long long>
+312 <  1>               bool init_
+313 <  7>               <PADDING: 7 bytes>
+320 <  8>               std::constexpr_storage_t<unsigned long long> storage_
+328 < 16>         std::optional<unsigned long long> responseBodyBytesReceived
+328 < 16>             std::OptionalBase<unsigned long long> std::OptionalBase<unsigned long long>
+328 <  1>               bool init_
+329 <  7>               <PADDING: 7 bytes>
+336 <  8>               std::constexpr_storage_t<unsigned long long> storage_
+344 < 16>         std::optional<unsigned long long> responseBodyDecodedSize
+344 < 16>             std::OptionalBase<unsigned long long> std::OptionalBase<unsigned long long>
+344 <  1>               bool init_
+345 <  7>               <PADDING: 7 bytes>
+352 <  8>               std::constexpr_storage_t<unsigned long long> storage_
+360 < 24>     std::optional<WebCore::CertificateInfo> m_certificateInfo
+360 < 24>         std::OptionalBase<WebCore::CertificateInfo> std::OptionalBase<WebCore::CertificateInfo>
+360 <  1>           bool init_
+361 <  7>           <PADDING: 7 bytes>
+368 < 16>           std::storage_t<WebCore::CertificateInfo> storage_
+384 < 16>     std::optional<WTF::Seconds> m_age
+384 < 16>         std::OptionalBase<WTF::Seconds> std::OptionalBase<WTF::Seconds>
+384 <  1>           bool init_
+385 <  7>           <PADDING: 7 bytes>
+392 <  8>           std::constexpr_storage_t<WTF::Seconds> storage_
+400 < 16>     std::optional<WTF::WallTime> m_date
+400 < 16>         std::OptionalBase<WTF::WallTime> std::OptionalBase<WTF::WallTime>
+400 <  1>           bool init_
+401 <  7>           <PADDING: 7 bytes>
+408 <  8>           std::constexpr_storage_t<WTF::WallTime> storage_
+416 < 16>     std::optional<WTF::WallTime> m_expires
+416 < 16>         std::OptionalBase<WTF::WallTime> std::OptionalBase<WTF::WallTime>
+416 <  1>           bool init_
+417 <  7>           <PADDING: 7 bytes>
+424 <  8>           std::constexpr_storage_t<WTF::WallTime> storage_
+432 < 16>     std::optional<WTF::WallTime> m_lastModified
+432 < 16>         std::OptionalBase<WTF::WallTime> std::OptionalBase<WTF::WallTime>
+432 <  1>           bool init_
+433 <  7>           <PADDING: 7 bytes>
+440 <  8>           std::constexpr_storage_t<WTF::WallTime> storage_
+448 < 32>     WebCore::ParsedContentRange m_contentRange
+448 <  1>       bool m_isValid
+449 <  7>       <PADDING: 7 bytes>
+456 <  8>       int64_t m_firstBytePosition
+464 <  8>       int64_t m_lastBytePosition
+472 <  8>       int64_t m_instanceLength
+480 < 40>     WebCore::CacheControlDirectives m_cacheControlDirectives
+480 < 16>         std::optional<WTF::Seconds> maxAge
+480 < 16>             std::OptionalBase<WTF::Seconds> std::OptionalBase<WTF::Seconds>
+480 <  1>               bool init_
+481 <  7>               <PADDING: 7 bytes>
+488 <  8>               std::constexpr_storage_t<WTF::Seconds> storage_
+496 < 16>         std::optional<WTF::Seconds> maxStale
+496 < 16>             std::OptionalBase<WTF::Seconds> std::OptionalBase<WTF::Seconds>
+496 <  1>               bool init_
+497 <  7>               <PADDING: 7 bytes>
+504 <  8>               std::constexpr_storage_t<WTF::Seconds> storage_
+512 <  1>       bool noCache
+513 <  1>       bool noStore
+514 <  1>       bool mustRevalidate
+515 <  1>       bool immutable
+516 <  4>   <PADDING: 4 bytes>
+520 < 21>     std::optional<std::__1::array<unsigned char, 20> > m_cacheBodyKey
+520 < 21>         std::OptionalBase<std::__1::array<unsigned char, 20> > std::OptionalBase<std::__1::array<unsigned char, 20> >
+520 <  1>           bool init_
+521 < 20>           std::constexpr_storage_t<std::__1::array<unsigned char, 20> > storage_
+541 <  3>   <PADDING: 3 bytes>
+544 <  4>   WebCore::ResourceResponseBase::Source m_source
+548 <  4>   WebCore::ResourceResponseBase::Type m_type
+552 <  4>   WebCore::ResourceResponseBase::Tainting m_tainting
+556 <  4>   int m_httpStatusCode
+560 <  1>   bool m_isNull
+561 <  1>   bool m_haveParsedCacheControlHeader
+562 <  1>   bool m_haveParsedAgeHeader
+563 <  1>   bool m_haveParsedDateHeader
+564 <  1>   bool m_haveParsedExpiresHeader
+565 <  1>   bool m_haveParsedLastModifiedHeader
+566 <  1>   bool m_haveParsedContentRangeHeader
+567 <  1>   bool m_isRedirected
Total byte size: 568
Total pad bytes: 132
Padding percentage: 23.24 %

so it's a whopping 568 bytes about a quarter of which is wasted space. Each optional<WallTime> wastes 7 bytes.
Comment 1 Rob Buis 2018-07-31 02:12:37 PDT
Created attachment 346147 [details]
Patch
Comment 2 Frédéric Wang (:fredw) 2018-07-31 02:46:14 PDT
Comment on attachment 346147 [details]
Patch

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

> Source/WebCore/ChangeLog:3
> +        ResourceResponseBase wastes a lot of space because of std::optional<>

This looks good, but I think Simon's intention was more general than just removing one optional member. So I would attach this patch to a separate bug (maybe a dependency or see also one) so that we keep this bug open.
Comment 3 Rob Buis 2018-07-31 04:18:24 PDT
I understand the bug but thought maybe I could get away with it ;) New bug opened at https://bugs.webkit.org/show_bug.cgi?id=188192.
Comment 4 Rob Buis 2018-07-31 04:19:38 PDT
Comment on attachment 346147 [details]
Patch

Move this patch to https://bugs.webkit.org/show_bug.cgi?id=188192.
Comment 5 Fujii Hironori 2018-08-06 06:55:41 PDT
https://github.com/akrzemi1/markable
'markable' is a single header optional-like template library with no space overhead.
Comment 6 Simon Fraser (smfr) 2018-08-06 11:12:49 PDT
(In reply to Fujii Hironori from comment #5)
> https://github.com/akrzemi1/markable
> 'markable' is a single header optional-like template library with no space
> overhead.

Yeah but it just uses magic values.
Comment 7 Rob Buis 2019-06-22 08:47:34 PDT
Created attachment 372680 [details]
Patch
Comment 8 EWS Watchlist 2019-06-22 10:03:32 PDT
Comment on attachment 372680 [details]
Patch

Attachment 372680 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/12550088

New failing tests:
imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html
media/sources-fallback-codecs.html
imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html
imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer.html
media/audio-data-url.html
inspector/console/webcore-logging.html
Comment 9 EWS Watchlist 2019-06-22 10:03:34 PDT
Created attachment 372681 [details]
Archive of layout-test-results from ews101 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 10 EWS Watchlist 2019-06-22 10:12:04 PDT
Comment on attachment 372680 [details]
Patch

Attachment 372680 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/12550099

New failing tests:
imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html
media/sources-fallback-codecs.html
imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html
imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer.html
media/audio-data-url.html
inspector/console/webcore-logging.html
Comment 11 EWS Watchlist 2019-06-22 10:12:06 PDT
Created attachment 372682 [details]
Archive of layout-test-results from ews104 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 12 EWS Watchlist 2019-06-22 10:42:33 PDT
Comment on attachment 372680 [details]
Patch

Attachment 372680 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/12550122

New failing tests:
imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html
media/sources-fallback-codecs.html
imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html
imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer.html
media/audio-data-url.html
inspector/console/webcore-logging.html
Comment 13 EWS Watchlist 2019-06-22 10:42:35 PDT
Created attachment 372683 [details]
Archive of layout-test-results from ews112 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 14 Rob Buis 2019-06-22 10:52:37 PDT
Created attachment 372684 [details]
Patch
Comment 15 Simon Fraser (smfr) 2019-06-22 17:32:25 PDT
Comment on attachment 372684 [details]
Patch

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

> Source/WebCore/platform/network/ParsedContentRange.h:52
> +    int64_t m_lastBytePosition { -1 };

Why not use Markable<>?
Comment 16 Rob Buis 2019-06-23 07:54:45 PDT
Created attachment 372698 [details]
Patch
Comment 17 EWS Watchlist 2019-06-23 09:09:33 PDT
Comment on attachment 372698 [details]
Patch

Attachment 372698 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/12555765

New failing tests:
fast/files/apply-blob-url-to-xhr-using-open-panel.html
http/tests/appcache/fallback-namespace-outside-manifest-path.html
fast/files/apply-blob-url-to-xhr.html
http/tests/local/fileapi/send-sliced-dragged-file.html
http/tests/appcache/abort-cache-ondownloading-manifest-404.html
http/tests/appcache/remove-cache.html
http/tests/appcache/404-manifest.html
http/tests/appcache/deferred-events.html
Comment 18 EWS Watchlist 2019-06-23 09:09:34 PDT
Created attachment 372702 [details]
Archive of layout-test-results from ews103 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 19 EWS Watchlist 2019-06-23 09:18:17 PDT
Comment on attachment 372698 [details]
Patch

Attachment 372698 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/12555773

New failing tests:
http/tests/appcache/abort-cache-ondownloading-manifest-404.html
http/wpt/fetch/inspect-preflight.html
http/tests/security/bypassing-cors-checks-for-extension-urls.html
http/tests/appcache/fallback-namespace-outside-manifest-path.html
http/tests/appcache/remove-cache.html
http/tests/appcache/404-manifest.html
http/tests/appcache/deferred-events.html
http/tests/xmlhttprequest/redirect-cross-origin-sync-double.html
Comment 20 EWS Watchlist 2019-06-23 09:18:19 PDT
Created attachment 372703 [details]
Archive of layout-test-results from ews106 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 21 EWS Watchlist 2019-06-23 09:49:15 PDT
Comment on attachment 372698 [details]
Patch

Attachment 372698 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/12555808

New failing tests:
imported/w3c/web-platform-tests/fetch/api/basic/integrity.sub.any.html
imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.html
imported/w3c/web-platform-tests/cors/origin.htm
imported/w3c/web-platform-tests/resource-timing/resource_TAO_match_origin.htm
imported/w3c/web-platform-tests/resource-timing/resource_TAO_match_wildcard.htm
imported/w3c/web-platform-tests/cors/allow-headers.htm
imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any.html
imported/w3c/web-platform-tests/resource-timing/resource_TAO_wildcard.htm
imported/w3c/web-platform-tests/cors/response-headers.htm
imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any.html
http/tests/appcache/abort-cache-ondownloading-manifest-404.html
imported/w3c/web-platform-tests/resource-timing/resource_TAO_null.htm
http/tests/fetch/caching-with-different-options.html
imported/w3c/web-platform-tests/resource-timing/resource_TAO_multi.htm
imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.html
imported/w3c/web-platform-tests/resource-timing/resource_TAO_zero.htm
imported/w3c/web-platform-tests/resource-timing/resource_TAO_origin.htm
http/tests/appcache/deferred-events.html
imported/w3c/web-platform-tests/resource-timing/resource_TAO_origin_uppercase.htm
imported/w3c/web-platform-tests/resource-timing/resource_TAO_space.htm
http/tests/xmlhttprequest/access-control-and-redirects.html
http/wpt/fetch/response-opaque-clone.html
http/tests/xmlhttprequest/simple-cross-origin-denied-events-sync.html
http/tests/appcache/remove-cache.html
http/tests/appcache/404-manifest.html
Comment 22 EWS Watchlist 2019-06-23 09:49:17 PDT
Created attachment 372704 [details]
Archive of layout-test-results from ews115 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 23 EWS Watchlist 2019-06-23 09:59:52 PDT
Comment on attachment 372698 [details]
Patch

Attachment 372698 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/12555876

New failing tests:
http/tests/xmlhttprequest/redirect-cross-origin-post-sync.html
http/tests/xmlhttprequest/XMLHttpRequestException.html
http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect.html
http/tests/xmlhttprequest/connection-error-sync.html
http/tests/xmlhttprequest/redirect-cross-origin-tripmine.html
http/tests/xmlhttprequest/redirect-cross-origin-sync.html
http/tests/xmlhttprequest/access-control-and-redirects.html
fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html
http/tests/fetch/caching-with-different-options.html
http/tests/xmlhttprequest/onloadend-event-after-sync-requests.html
Comment 24 EWS Watchlist 2019-06-23 09:59:55 PDT
Created attachment 372706 [details]
Archive of layout-test-results from ews210 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews210  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 25 EWS Watchlist 2019-06-23 10:00:58 PDT
Comment on attachment 372698 [details]
Patch

Attachment 372698 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/12555827

New failing tests:
http/tests/xmlhttprequest/cross-site-denied-response-sync-2.html
http/tests/xmlhttprequest/cross-site-denied-response-sync.html
http/tests/appcache/fallback-namespace-outside-manifest-path.html
http/wpt/fetch/inspect-preflight.html
http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-sync.html
http/tests/xmlhttprequest/simple-cross-origin-denied-events-sync.html
http/tests/appcache/abort-cache-ondownloading-manifest-404.html
http/tests/xmlhttprequest/redirect-cross-origin-sync.html
http/tests/appcache/remove-cache.html
http/tests/appcache/deferred-events.html
http/tests/xmlhttprequest/origin-whitelisting-removal.html
http/tests/xmlhttprequest/redirect-cross-origin-sync-double.html
Comment 26 EWS Watchlist 2019-06-23 10:01:00 PDT
Created attachment 372707 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.14.5
Comment 27 Rob Buis 2019-06-23 13:41:00 PDT
Created attachment 372708 [details]
Patch
Comment 28 EWS Watchlist 2019-06-23 14:55:56 PDT
Comment on attachment 372708 [details]
Patch

Attachment 372708 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/12557113

New failing tests:
fast/files/apply-blob-url-to-xhr.html
http/tests/appcache/fallback-namespace-outside-manifest-path.html
http/tests/local/fileapi/send-sliced-dragged-file.html
Comment 29 EWS Watchlist 2019-06-23 14:55:58 PDT
Created attachment 372712 [details]
Archive of layout-test-results from ews103 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 30 EWS Watchlist 2019-06-23 15:04:08 PDT
Comment on attachment 372708 [details]
Patch

Attachment 372708 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/12557123

New failing tests:
http/tests/appcache/fallback-namespace-outside-manifest-path.html
http/tests/xmlhttprequest/XMLHttpRequestException.html
Comment 31 EWS Watchlist 2019-06-23 15:04:10 PDT
Created attachment 372713 [details]
Archive of layout-test-results from ews107 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 32 EWS Watchlist 2019-06-23 15:35:18 PDT
Comment on attachment 372708 [details]
Patch

Attachment 372708 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/12557143

New failing tests:
http/wpt/fetch/response-opaque-clone.html
imported/w3c/web-platform-tests/fetch/api/basic/integrity.sub.any.html
imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any.html
imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.html
http/tests/fetch/caching-with-different-options.html
imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.sub.any.html
imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any.html
Comment 33 EWS Watchlist 2019-06-23 15:35:20 PDT
Created attachment 372716 [details]
Archive of layout-test-results from ews115 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 34 Rob Buis 2019-06-24 01:38:36 PDT
Created attachment 372738 [details]
Pach
Comment 35 Rob Buis 2019-06-24 12:12:42 PDT
Created attachment 372783 [details]
Patch
Comment 36 EWS Watchlist 2019-06-24 13:10:29 PDT
Comment on attachment 372783 [details]
Patch

Attachment 372783 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/12564559

New failing tests:
http/tests/appcache/abort-cache-ondownloading-manifest-404.html
http/tests/appcache/404-manifest.html
http/tests/appcache/remove-cache.html
http/tests/appcache/deferred-events.html
Comment 37 EWS Watchlist 2019-06-24 13:10:31 PDT
Created attachment 372788 [details]
Archive of layout-test-results from ews101 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 38 EWS Watchlist 2019-06-24 13:18:48 PDT
Comment on attachment 372783 [details]
Patch

Attachment 372783 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/12564606

New failing tests:
http/wpt/fetch/inspect-preflight.html
http/tests/appcache/abort-cache-ondownloading-manifest-404.html
http/tests/appcache/404-manifest.html
http/tests/appcache/remove-cache.html
http/tests/appcache/deferred-events.html
Comment 39 EWS Watchlist 2019-06-24 13:18:50 PDT
Created attachment 372789 [details]
Archive of layout-test-results from ews104 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 40 EWS Watchlist 2019-06-24 14:07:39 PDT
Comment on attachment 372783 [details]
Patch

Attachment 372783 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/12564719

New failing tests:
http/tests/appcache/abort-cache-ondownloading-manifest-404.html
http/tests/appcache/404-manifest.html
http/tests/appcache/remove-cache.html
http/tests/appcache/deferred-events.html
Comment 41 EWS Watchlist 2019-06-24 14:07:41 PDT
Created attachment 372799 [details]
Archive of layout-test-results from ews112 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 42 EWS Watchlist 2019-06-24 14:17:14 PDT
Comment on attachment 372783 [details]
Patch

Attachment 372783 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/12564751

New failing tests:
http/wpt/fetch/inspect-preflight.html
http/tests/appcache/abort-cache-ondownloading-manifest-404.html
http/tests/appcache/remove-cache.html
http/tests/appcache/deferred-events.html
Comment 43 EWS Watchlist 2019-06-24 14:17:16 PDT
Created attachment 372802 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.14.5
Comment 44 Rob Buis 2019-06-29 11:39:37 PDT
Created attachment 373173 [details]
Patch
Comment 45 EWS Watchlist 2019-06-29 13:01:35 PDT
Comment on attachment 373173 [details]
Patch

Attachment 373173 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/12613424

New failing tests:
http/tests/inspector/network/getSerializedCertificate.html
http/tests/inspector/network/resource-security-certificate.html
http/tests/inspector/network/resource-sizes-disk-cache.html
http/tests/cache/link-prefetch-main-resource.html
http/tests/inspector/network/resource-response-source-disk-cache.html
Comment 46 EWS Watchlist 2019-06-29 13:01:37 PDT
Created attachment 373175 [details]
Archive of layout-test-results from ews104 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 47 Rob Buis 2019-06-29 13:36:44 PDT
Created attachment 373176 [details]
Patch
Comment 48 Rob Buis 2019-06-30 11:51:54 PDT
Created attachment 373194 [details]
Patch
Comment 49 Daniel Bates 2019-06-30 12:19:26 PDT
Patches seems absolutely in the wrong direction we want in this project in my opinion. In my opinion the project wants to use enum classes (not enum) and in my opinion we don't want enumerators like SourceNetwork <--concatenating the concept and value. In my opinion I would figure out a way to save the space without undoing everything. Failing this I would demand that I have a damn good reason 😀 for all this terribleness, stats or something concrete and all.
Comment 50 Ryosuke Niwa 2019-09-05 01:03:48 PDT
Comment on attachment 373194 [details]
Patch

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

> Source/WebCore/platform/network/ResourceResponseBase.h:234
> +protected:
> +    int m_httpStatusCode { 0 };
> +
> +private:
> +    mutable bool m_includesCertificateInfo : 1;

This is a really shitty way of packing stuff.
Move m_httpStatusCode past all these boolean bitfields, and they would pack a lot better.
Comment 51 Ryosuke Niwa 2019-09-05 01:08:15 PDT
Comment on attachment 373194 [details]
Patch

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

> Source/WebCore/platform/network/ResourceResponseBase.h:70
> +        unsigned type : 3;
> +        unsigned tainting : 2;
>          bool isRedirected;

Type and Training are each one byte if we use uint8_t width so making them bitfields isn't gonna save anything.
We're better off moving httpStatusCode down here so that it's better packed with these enum classes & bool.

> Source/WebCore/platform/network/ResourceResponseBase.h:248
> +    unsigned m_source : 3;
> +    unsigned m_type : 3;
> +    unsigned m_tainting : 2;

Again, we should just use enum class with uint8_t width.
There are 3 uint8_t enum class types here (3 bytes) then if you move m_httpStatusCode here,
that would neatly pack into one word (8 bytes) in 64-bit.
Comment 52 Ryosuke Niwa 2019-09-05 01:13:27 PDT
(In reply to Daniel Bates from comment #49)
> Patches seems absolutely in the wrong direction we want in this project in
> my opinion. In my opinion the project wants to use enum classes (not enum)
> and in my opinion we don't want enumerators like SourceNetwork
> <--concatenating the concept and value.

Yeah, it's not like we can't cast unsigned to enum class either. Packing objects better matter in many cases but here, we don't need to resort to bitfields at all since three uint8_t + one uint32_t would pack neatly into a single uint64_t space.
Comment 53 Yusuke Suzuki 2021-04-03 13:04:33 PDT
I think this is fixed by bug 207618

*** This bug has been marked as a duplicate of bug 207618 ***