Why the first epoch of .fit is very slow?

I notice that the first epoch of model.fit takes more time than the following epochs. In the current experiment I’m doing it is 10 times slower which is really huge.
What could explain this and how can we speed up this first epoch runtime ?

The difference in timings is due to the data being generated and loaded into memory before and during the first epoch.

Sometimes import statement that caused a confusion between keras and tensorflow.keras. Replacing import keras* by import tensorflow.keras* may help.

Thank you.