Change the value of your
SerialPort.WriteBufferSize Property[
^] - it defaults to 2048, and when it fills the buffer, it will pause your task until it has space. Since COM ports tend to be rather slow devices (the baud rate you set when you configured it is in bits per second, so 9600 baud works out to around 1000 characters per second) it may need to wait some time to complete the output if the message is a significant size.