[squid-dev] [PATCH] cleanup external_acl_type cache

Alex Rousskov rousskov at measurement-factory.com
Wed Apr 12 15:43:11 UTC 2017


On 04/12/2017 09:30 AM, Adam Majer wrote:
>>> If you need an intrusive list container for performance reasons, please
>>> consider using Boost.Intrusive instead of rolling your own.

>> The idea of using Boost for Squid has been discussed and, IIRC, rejected
>> (for the time being): We have more than enough troubles coping with
>> standard C++ features. Dealing with another major library (that should
>> penetrate a lot of Squid code to gain the most benefits) without an
>> in-house Boost expert is a bad idea, especially when the Squid code
>> itself is still too messy to allow for neat/safe conversions like that.
>> C++11 reduces the pressure to use Boost by providing some of the Boost
>> features.


> Using a
> very small, header-only part to replace handrolled implementation is I
> think a positive.

Reusing a "very small" piece of code could have been a positive, but
Boost intrusive list is not (and probably cannot be) that:

> #include <boost/intrusive/detail/config_begin.hpp>
> #include <boost/intrusive/intrusive_fwd.hpp>
> #include <boost/intrusive/detail/assert.hpp>
> #include <boost/intrusive/list_hook.hpp>
> #include <boost/intrusive/circular_list_algorithms.hpp>
> #include <boost/intrusive/pointer_traits.hpp>
> #include <boost/intrusive/detail/mpl.hpp>
> #include <boost/intrusive/link_mode.hpp>
> #include <boost/intrusive/detail/get_value_traits.hpp>
> #include <boost/intrusive/detail/is_stateful_value_traits.hpp>
> #include <boost/intrusive/detail/default_header_holder.hpp>
> #include <boost/intrusive/detail/reverse_iterator.hpp>
> #include <boost/intrusive/detail/uncast.hpp>
> #include <boost/intrusive/detail/list_iterator.hpp>
> #include <boost/intrusive/detail/array_initializer.hpp>
> #include <boost/intrusive/detail/exception_disposer.hpp>
> #include <boost/intrusive/detail/equal_to_value.hpp>
> #include <boost/intrusive/detail/key_nodeptr_comp.hpp>
> #include <boost/intrusive/detail/simple_disposers.hpp>
> #include <boost/intrusive/detail/size_holder.hpp>
> #include <boost/intrusive/detail/algorithm.hpp>
> 
> #include <boost/move/utility_core.hpp>
> #include <boost/static_assert.hpp>
> 
> #include <boost/intrusive/detail/minimal_less_equal_header.hpp>//std::less

And even a small piece of Boost code (in terms of number of characters)
usually introduces a whole set of Boost concepts that we should not be
dealing with (right now) for the previously discussed reasons.

Alex.



More information about the squid-dev mailing list