Added some profiling to sendMessage