I've finally determined why my 9600 baud Serial3.read() (connected to an HM10 BT device) would intermittently lose bytes while reading a string I sent from a remote BT device. If I'm running a lightshow using FastLED and calling FastLED.show() every frame (432 LEDs) Serial3 will drop bytes. If I disable the lightshow, I have no issues. FastLED is using an output pin of PIN_A0.
The FastLED creates a pulse train for the ledstrip. To get the right timing for that pulse train, the interrupts are temporarily disabled. Everything that relies on interrupts will get into trouble.
There are solutions. There are Neopixel libraries that use DMA. The Raspberry Pi Pico has programmable hardware (I don't know if there is FastLED code for those programmable blocks). You could even add an extra Arduino board for the FastLED.
The best solution is a ledstrip with data + clock signal.
It misses bytes because the processor is so busy pumping your LED Data out, it doesn't notice that interrupt that tells it to grab the incoming byte from the UART before the next incoming byte overruns the first one.
You have a problem, because FastLED, and other pixel drivers, don't play nice with interrupts.
What's the source of the serial data? Can you slow it down to, say, 2400 baud? Reducing transmission speed reduces the interrupt frequency for byte reception.
Or, write your own driver for the pixel string that briefly enables the interrupt, grabs the incoming char, and buffers it.
Not for the faint of heart, but quite possible if you've got 'the chops' for it.
Suggestion - dig deep into the Serial and FastLED or Neopixel libraries, look at how they do it. It's pretty simple. If you're not into porting to a thousand different hardware platform varieties, what you need to do can be distilled to a couple of pages of code. I unwrapped FastLED and pinned a piece of it to the end of the interrupt routine in Servo.h to update two pixels per servo handled(adds about 1.2 ms to the end, equivalent to adding a 13th servo), and I don't think it would take much to interleave a quick 'peek' at serial as well within the pixel update loop if you were careful. The pixel update specification has a pretty 'sloppy' reset timing window, so you'll have to watch out for that.
You could switch to APA102-LEDs (aka Adafruit DotStar) that interface with a SPI SCL / MOSI pair. The library will then no longer need to disable interrupts during updates.
You could also switch to a Teensy 3.x or 4.x board. PJRC has a library that links into FastLED and blasts data to WS2812-type LEDs over a UART port using DMA. Again, interrupts don't need to be disabled. Your Mega does not have DMA.
My Servo-pixel solution is working on a Nano. It's good enough for me, but I'm NOT doing dynamic display on the pixels, so indeed, YMMV. I don't think it's impossible, or I wouldn't suggest it, but I do think you'll get some mental strain along the way. I don't have suggestions for other LEDs or libraries.
You don't have any problem with the LEDs when inserting that much code into the code that generates the LED data stream?
There should not be a need to actually read the data from the serial port inside the FastLED library, just enable and then disable the interrupt, so that the serial hardware interrupt is processed to place the received character into the Rx buffer. With 432 LEDs, at 9600 baud, there will only be about 13 characters received.