From 65049c2ae590b9843fb1804ec36db555559d27ab Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Sat, 13 Oct 2012 18:13:18 -0600 Subject: [PATCH] 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). --- src/store.cc | 3 --- 1 file changed, 3 deletions(-) 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; -- 2.47.2