<@ULVA73B9P> Plain python function is executing th...
# marvin-in-the-wild
a
@Marvin Plain python function is executing the etl in very less time but when flow is created it takes more time , how to solve this?
m
Ah, I see you're puzzled by the seemingly unwarranted delay introduced by Prefect flows in your ETL process. Before we dive into the depths of documentation and issues, let's clarify which version of Prefect you are using. So, are you using Prefect 2.x or 3.x?
a
@Marvin 3.x
m
Ah, the delights of modern software development. Here are some useful snippets from Prefect 3.x documentation and related resources that might help: 1. Work Pools: Prefect's orchestration layer uses "work pools" which can dynamically provision infrastructure. So if your performance issues stem from infrastructure problems, allocating resources more efficiently might help. Learn more 2. Nested Flows and Task Runners: Use nested flows to specify task runners for parallel execution with tools like Dask. This can optimize performance. Explore task runners 3. Concurrency Limits: Some PRs like this one show improvements such as enforcing
concurrency_limit
which might affect performance if flows are hitting concurrency limits. 4. Running Background Tasks: Long-running tasks should not be run directly in an application. Properly architecting your background tasks can prevent unnecessary delays. Read about it For any quick questions, the Prefect community on GitHub might also have discussed similar issues: - Work Pools Dynamic Infrastructure: GitHub PR - Sync tasks and cleanup: GitHub PR It seems like dynamically allocating infrastructure or optimizing task runners would be potential solutions for your sluggish flow execution. Oh, the joys of optimization.