Max72xxPanel library

Yes the code could be very greatly improved it is very turged.

The problem on the Arduino side is that if you read an M from the serial port you then assume that their are 64 values to read and they might not all have arrived.

On the processing side you are being very wasteful sending the data as strings and giving the Arduino a lot more to do in converting that string into an int value.

If you only send int values then you cut down one hell of a lot of work the system has to do. Note your Arduino serial buffer is only 64 bytes anyway.