|
Boost : |
Subject: Re: [boost] [log] Comments
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2010-03-16 11:00:10
On 03/16/2010 08:50 AM, Vladimir Prus wrote:
> On Tuesday 16 March 2010 01:34:52 Andrey Semashev wrote:
>
>> In my view, the filter should be replaced on update. You can have the
>> map of components or whatever, and the filter pointing to them. On
>> update you create a new map and a new filter, and set it to the
>> core/sinks. No additional locking required, no special syntax,
>> everything's safe and clean. Same goes for formatters.
>
> What about performance? If I have 100 components, copying map on
> each update seems not too good. Locking is probably better.
It's you use case, and you probably know better. But I seriously doubt
that locking the filter on each log record (which, I assume, is rather
often) can be better than filling a 100-element container on occasional
config updates.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk