[squid-users] Debugging slow access

Steve Hill steve at opendium.com
Tue Jan 6 17:11:50 UTC 2015


On 06.01.15 12:15, Steve Hill wrote:

> Alternatively, A->absorb(B) could be altered to remove any notes from A
> that have the same keys as B's notes, before using appendNewOnly() to
> merge them?

I've implemented this for now in the attached patch and am currently 
testing it.  Initial results suggest it resolves the problem.

It introduces a new method, NotePairs::appendAndReplace(), which 
iterates through the source NotePairs and removes any NotePairs in the 
destination that have the same key, then calls append().

This is not the most efficient way of erasing the notes, because Squid's 
Vector template doesn't appear to have an erase() method.

-- 
  - Steve Hill
    Technical Director
    Opendium Limited     http://www.opendium.com

Direct contacts:
    Instant messager: xmpp:steve at opendium.com
    Email:            steve at opendium.com
    Phone:            sip:steve at opendium.com

Sales / enquiries contacts:
    Email:            sales at opendium.com
    Phone:            +44-1792-824568 / sip:sales at opendium.com

Support contacts:
    Email:            support at opendium.com
    Phone:            +44-1792-825748 / sip:support at opendium.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: squid-notes.patch
Type: text/x-patch
Size: 1984 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20150106/19c2e058/attachment.bin>


More information about the squid-users mailing list