acoustic-carpenter-78188
04/14/2023, 5:52 PM6~8 seconds to 0.25~0.30 seconds.
It can improve performance up to 30x when running a simple workflow.
@task
def demo_task():
print("foobar")
@workflow
def demo_workflow():
demo_task()
(flytekit-3.9) ➜ PYTHONPROFILEIMPORTTIME=1 python tuna.py &> myscript.prof && tuna myscript.prof
Before:
image▾
image▾
lazy_import in the flytekit to load module lazily.
Tracking Issue
https://flyte-org.slack.com/archives/CP2HDHKE1/p1681239386271109?thread_ts=1681235972.845179&cid=CP2HDHKE1
Follow-up issue
NA
flyteorg/flytekit
Codecov: 38.51% of diff hit (target 70.10%)
✅ 29 other checks have passed
29/30 successful checksacoustic-carpenter-78188
05/05/2023, 7:28 PM