On Sun, Jul 27, 2008 at 12:58 PM, Tomasz Sterna <[EMAIL PROTECTED]> wrote:
> Dnia 2008-07-24, czw o godzinie 12:17 +0200, Tomasz Sterna pisze:
>> I will look at the throttling possibilities (instead of
>> disconnections)
>> during the weekend.
>> I have a hunch it is doable. :-)
>
> It's done. http://jabberd2.xiaoka.com/changeset/639/
> It was actually pretty easy - I hooked into _c2s_time_checks() and added
> reading of throttled connections there.
>
> Please test it if you may. It looks like working OK. But I may not come
> up with and tested all edge cases.

Neat!  On thing we noticed is that c2s calls _c2s_time_checks() more
often and therefore iterates through all connections more often (by
default every 5 seconds instead of never).  One change that would be a
huge improvement is to put limited connections into a linked list, and
remove them from the list when they're clear.  Then you could iterate
through the short list of throttled connections instead of the long
list of all connections.  It would probably be empty most of the time.

It still wouldn't be beautifully event-driven, but it should be less
resource intensive.

-Mark

-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to