At 10:12 AM 6/17/2005, Brian Akins wrote:
>>Adding an indexed list of 'counts' would be
>>very lightweight, and one atomic increment and decrement per state
>>change.  This would probably be more efficient than walking the
>>entire list.
>
>Sounds good.  Of course, when changing from on state to another you would 
>always have to decrement the previous state and increment the new one.  The 
>way the core seems to be now, that would require some careful examination of 
>the code to ensure all the state changes were covered.

In that exact order :)  Much better to 'under report' a given state,
and consider that under reporting (if you sum during an update) to be
a product of state changes.

I think ++, -- would be much more misleading, since the server would
be taking more actions than could possibly occur at once.

Bill


Reply via email to