We currently save all body data as separate files. We can improve space efficiency and do less reads by inlining smaller resources.
Created attachment 250824 [details] patch
Attachment 250824 [details] did not pass style-queue: ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannel.h:47: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannel.h:48: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannel.h:49: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:82: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:99: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:109: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 6 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 250824 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=250824&action=review > Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp:497 > + const size_t maximumInlineBodySize = 16 << 10; Not sure what the preferred style is but writing this as 16 * 1024 would be clearer to me than the bitshift.
Comment on attachment 250824 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=250824&action=review r=me > Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp:349 > + return { }; Slight preference for "return Nullopt;" >> Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp:497 >> + const size_t maximumInlineBodySize = 16 << 10; > > Not sure what the preferred style is but writing this as 16 * 1024 would be clearer to me than the bitshift. I agree with Pratik here. > Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp:516 > + bool storeAsBlob = shouldStoreBodyAsBlob(write.record.body); shouldStoreAsBlob as per our boolean variable naming coding style?
https://trac.webkit.org/r182856
<rdar://problem/20578464>