This may not be related to the slowness, but if you are using the OpenACS 4.6 branch you should also be using the dotlrn 1.0 branch. However, given the message keys in your post (the syntax is <span>#</span>package_key.message_key#) you must be on dotlrn head.