If I set the php memory to 512M or 1024M instead of the unlimited memory the sitemap will generate with 40,000 URL, I will took so long like 35.47 seconds.
So it will return an Error on the google search console because google could not wait for that amount of time to load sitemap
So how can I make the generating fast the execution time as also been increase but still taking more time to generate sitemap