Stop referring to outdated RFC2616 in CacheValidation.cpp and refer to the newer RFC7230 & RFC7234.
Created attachment 250535 [details] Patch
Comment on attachment 250535 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=250535&action=review > Source/WebCore/platform/network/CacheValidation.h:51 > +WEBCORE_EXPORT std::chrono::microseconds computeCurrentAge(const ResourceResponse&, const std::chrono::system_clock::time_point& responseTimestamp); > +WEBCORE_EXPORT std::chrono::microseconds computeFreshnessLifetimeForHTTPFamily(const ResourceResponse&, const std::chrono::system_clock::time_point& responseTimestamp); Do we really want to change to const time_point&? Anders has pushed me to actually pass objects rather than references for modest-sized structures in the recent past, so maybe that applies here.
Comment on attachment 250535 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=250535&action=review >> Source/WebCore/platform/network/CacheValidation.h:51 >> +WEBCORE_EXPORT std::chrono::microseconds computeFreshnessLifetimeForHTTPFamily(const ResourceResponse&, const std::chrono::system_clock::time_point& responseTimestamp); > > Do we really want to change to const time_point&? Anders has pushed me to actually pass objects rather than references for modest-sized structures in the recent past, so maybe that applies here. I have just verified that std::chrono::system_clock::time_point is only 8 bytes on my machine, so you are likely right. I'll revert this change.
Created attachment 250574 [details] Patch
FYI, I confirmed locally that passing by value here seems slightly faster on my MacBook Pro (lower is better): size: 8 bytes by_ref: 348884550 by_value: 341103395 (~2.2% faster) Benchmark: http://pastebin.com/UNmezmER // clang++ -std=c++11 -O3 test.cpp
Comment on attachment 250574 [details] Patch Clearing flags on attachment: 250574 Committed r182659: <http://trac.webkit.org/changeset/182659>
All reviewed patches have been landed. Closing bug.