Reading Serial Data from ESP8266

I've run a test on serial performance on a Uno and an ESP8266 with the code below. No UDP involved, so not a direct comparison with your program. The code sends 125,000 bytes of data and prints the elapsed time.

On both the Uno and the ESP8266, there was no latency that I could see. Both of them output 125,000 bytes in just over 5s at 250,000 bits/second. So, well above the output rate that you need.

However, on the ESP8266, the program hung on about one attempt in four or five. So, the serial (or my USB-serial converter) is not bullet proof.

But on your problem, where the amount of serial output is much less than this test, I wonder if the interaction with handling network traffic might be causing problems? I saw this on the Github page for the ESP8266 core:

Remember that there is a lot of code that needs to run on the chip besides the sketch when WiFi is connected. WiFi and TCP/IP libraries get a chance to handle any pending events each time the loop() function completes, OR when delay(...) is called. If you have a loop somewhere in your sketch that takes a lot of time (>50ms) without calling delay(), you might consider adding a call to delay function to keep the WiFi stack running smoothly. There is also a yield() function which is equivalent to delay(0).

Might be worth testing with a call to yield() added into the for loop in your program.

Test program:

#define BLOCK_SIZE 500UL
#define NUM_BLOCKS 250UL

char buffer[BLOCK_SIZE] = {0};

void setup()
{
  Serial.begin(250000);

  for (uint16_t i = 0; i < BLOCK_SIZE; i++)
  {
    buffer[i] = (char)('A' + (i % 16));
  }

  pinMode(13, OUTPUT);
  digitalWrite(13, HIGH);

  uint32_t startTime = millis();

  for (uint8_t i = 0; i < NUM_BLOCKS; i++)
  {
    for (uint16_t j = 0; j < BLOCK_SIZE; j++)
    {
      Serial.write(buffer[j]);
    }
    Serial.println();
  }

  uint32_t endTime = millis();

  digitalWrite(13, LOW);

  Serial.print(endTime - startTime);
  Serial.print("ms for ");
  Serial.print(BLOCK_SIZE * NUM_BLOCKS);
  Serial.println(" bytes");
}

void loop()
{

}