The chat rooms have an option to limit the number and age of messages displayed. With a long history of conversations, the messages retrieved and displayed by im_get_all_messages() can also become unwieldy, leading to slow AJAX requests and the browser slowing or eating memory. It would be handy to be able to add a filter by date, or at least a LIMIT on the query that retrieves those messages.