From: Alex Rousskov Date: Sun, 14 Oct 2012 00:13:18 +0000 (-0600) Subject: Do not check 'reply content_length is too big' condition twice. X-Git-Tag: SQUID_3_2_3~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65049c2ae590b9843fb1804ec36db555559d27ab;p=thirdparty%2Fsquid.git Do not check 'reply content_length is too big' condition twice. Saves a few CPU cycles. No visible runtime effects are expected. The semi-duplicate check was introduced in trunk r4410 while trying to prevent huge objects from being swapped out. It is not clear to me why that change helped at the time (but it could have something to do with negative content_length values and their effect on then-current size types). --- diff --git a/src/store.cc b/src/store.cc index b05a2ebd84..91fc190f0c 100644 --- a/src/store.cc +++ b/src/store.cc @@ -993,9 +993,6 @@ StoreEntry::checkCachable() mem_obj->endOffset() > Config.Store.maxObjectSize) { debugs(20, 2, "StoreEntry::checkCachable: NO: too big"); ++store_check_cachable_hist.no.too_big; - } else if (getReply()->content_length > Config.Store.maxObjectSize) { - debugs(20, 2, "StoreEntry::checkCachable: NO: too big"); - ++store_check_cachable_hist.no.too_big; } else if (checkTooSmall()) { debugs(20, 2, "StoreEntry::checkCachable: NO: too small"); ++store_check_cachable_hist.no.too_small;