This is a great hack, and my users have been enjoying it without too many problems for several weeks now! Great job!
I don't have a lot of resources on my server, so I have to be careful with things like this, but even with only 256M of RAM and ~30 users at a time (peak) everything seems to run ok.
I did however notice a gradual slowdown over the past few days. After having no luck with any mySQL settings (memory use is already well under control) I remembered to purge the deleted messages. That seems to have sped everything back up, though it could have been a coincidence.
Since I haven't had a chance to explore how this script works, I'm not even sure if deleting messages should really have an impact on server loads. Could anyone shed some light on this? I'm guessing the reason there are message limits in the usergroup settings isn't because a few text messages take up a lot of disk space.
If so, it may be useful to introduce an option where messages are purged automatically when read, and perhaps not saved to the sent items list. My users don't like having to delete their messages when they hit the cap, but if storing a lot of messages does nothing to performance I might as well just take the cap off ... no?