Hi,
I finally figured out why log5 sometimes becomes very slow. It happens when handle-message needs to update active-categories (because a new category is added). Array active-categories created by make-active-category-array has a fill pointer. When function update-active-categories adjusts the array, it does not touch the fill pointer. The array length always remains the same and handle-message updates active-categories on every invocation.
Regards, Ilya
Hi Ilya,
Thanks for catching this. I'll fix it.
On Feb 26, 2009, at 2:15 PM, Ilya Perminov wrote:
Hi,
I finally figured out why log5 sometimes becomes very slow. It happens when handle-message needs to update active-categories (because a new category is added). Array active-categories created by make-active-category- array has a fill pointer. When function update-active-categories adjusts the array, it does not touch the fill pointer. The array length always remains the same and handle-message updates active-categories on every invocation.
Regards, Ilya
log5-devel mailing list log5-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/log5-devel
-- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM * gwking on twitter
Hi Ilya,
The array isn't adjusted, it's actually created new and assigned to the sender.
I think that the problem may be that update-active-categories was using a #'>= test rather than a #'> test.
I'm not sure I've got the time to make a complete test case for this right now (i.e., one that fails with #'>= and passes with #'>) but the current suite passes with the change.
What do you think?
thanks,
On Feb 26, 2009, at 2:15 PM, Ilya Perminov wrote:
Hi,
I finally figured out why log5 sometimes becomes very slow. It happens when handle-message needs to update active-categories (because a new category is added). Array active-categories created by make-active-category- array has a fill pointer. When function update-active-categories adjusts the array, it does not touch the fill pointer. The array length always remains the same and handle-message updates active-categories on every invocation.
Regards, Ilya
log5-devel mailing list log5-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/log5-devel
-- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM * gwking on twitter