in reply to
Re: Performance quandary
in thread Performance quandary
Yep, this part is correct, I'm pretty sure. What happens during find_parent() is that we strip off one path element and a '/'. So, a URL of http://www.url.com/path/element becomes http://www.url.com/path. This is the Right Thing for the database key to match the Squid key for the same object (a requirement for this program).
So when we get down to the 'root' element, of http://www.url.com, this is the absolute last thing we can have an entry for. One more find_parent will strip the /www.url.com, leaving http:/, which what I'm checking for.
Right? I can't skip out on every entry that contains 'http:' because nothing will ever make it to the db. They /all/ have http: as the opener (again, this is so our MD5 hash of the object matches the Squid MD5 of the object--a requirement).