Hi,
I am not sure if this makes sense in your bussiness case, but perhaps you can do the file generation in the background, and provide a page where the user can see all the export requests he has issued, along with a status (running, completed, downloaded). Then the user also does not have to actively wait for the file to generate and can download them whenever he needs them.
just out of curiosity: How big is the file that you are downloading??
-Andrej
Can you share your microflow/model? There might be some optimization possibilities which can increase performance