Hello all, I have a `clean_up_task()` which is map...
# ask-community
q
Hello all, I have a
clean_up_task()
which is mapped to 180 files. It takes 30 seconds when I run this flow in local without agent and it takes 2 mins when i run it using local agent by UI. What can i do for optimizing this point. Thanks a lot.
k
Hey @Qin XIA, there will be some latency with each task because each task has to hit the Prefect API for each state change. That means for each task, there will be at least 3 API calls. It would probably be faster if you batch your files together to limit API calls, but then you lose the observability. The API calls are a fixed overhead. For longer tasks, they will be less noticeable.
q
@Kevin Kho i will try to review my conception. THX