Esp32 udp to serial

Hi all

Is this the best way to pick up udp data and print it to serial?

void loop() {

// if there's data available, read a packet
int packetSize = Udp.parsePacket();
if (packetSize)
// read the packet into packetBufffer
int len =, 255);
if (len > 0) packetBuffer[len] = 0;

How many prints can I do per sec? Anything that can be done to reduce loses?