https://prefect.io logo
Title
y

Yas Mah

03/02/2022, 8:50 AM
Hi, I have noticed, that the execution time for a flow which is run through the server is much than just running the flow locally without the monitoring from the server. I know that specific metadata will be exchanged between the server and the execution environement, but is there a way to optimize it?
a

Anna Geller

03/02/2022, 11:49 AM
There is a GitHub issue (that I couldn't find any more) that provides more information, but in general there will always be some latency with each task run running through the API backend because each task run has to hit the Prefect API for each state change. That means for each task run, there will be at least 3 API calls. There are some things you could do in Prefect <= 1.0 to speed up the execution e.g. if you batch some tasks together to limit the number of API calls, but then you lose the observability. So that's the tradeoff you need to consider. But I would be curious to hear whether you tried Orion? It's really fast, built async-first, and even your local execution gets recorded in the backend without you having to do anything. So Orion may be the solution to the issue you see
❤️ 1