@Jonny-Spaceman No.
The sketch that I posted takes 20 seconds to compile and less that 15 seconds to upload. Apple M1 Mac.
It is a generic test program I wrote for this reason and to help debug Serial.print problems.
I suggest trying my diag sketch to test your environment.
VS Code will not help compile this sketch any faster.
The sketch that takes Tea Time is then the problem.
If you tell me what M5Stack device you are using and the exact code, I will try it here.