Slow query and AI flow on prod ? please help

I have a function that sequentially calls different Genkit flows (nothing extremely complex).

In development, the process is fast and responsive as expected. However, once the project is deployed, the process still completes but takes a very long time.

For example, processing and saving 50 documents into a Firestore collection takes about 30 seconds in development (including the function loops and sending prompts to the Genkit flows).
On the deployed app, the exact same process takes more than 10 minutes.

My Firestore region is eur3, while the deployed backend runs in us-central1. Even if there were some additional latency in production due to region mismatch, this slowdown seems abnormal.

Where necessary, I have already created the Firestore indexes suggested during development and testing.

The published app has no traffic yet, it’s an internal app for my organization.

Set via apphosting.yaml the container has 4vcpu and 16giga ram