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