Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove FastAPI from prefect.flow's default import path. #16473

Merged
merged 3 commits into from
Dec 23, 2024

Conversation

aaazzam
Copy link
Collaborator

@aaazzam aaazzam commented Dec 21, 2024

In #16472, you can see that Prefect allocates around 13MB of memory to import RunnerStorage.

Screenshot 2024-12-20 at 8 57 39 PM

After some digging, this is largely owed to importing jsonable_encoder inside prefect.flows. Making that a lazy import eliminates ~12.9MB of that 13MB import.

@github-actions github-actions bot added the bug Something isn't working label Dec 21, 2024
Copy link

codspeed-hq bot commented Dec 21, 2024

CodSpeed Performance Report

Merging #16473 will not alter performance

Comparing move-fastapi-off-core-path (9fc1fec) with main (46c6164)

Summary

✅ 3 untouched benchmarks

Copy link
Member

@cicdw cicdw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, good find - LGTM once static checks are fixed

@aaazzam aaazzam merged commit 9cc380d into main Dec 23, 2024
42 checks passed
@aaazzam aaazzam deleted the move-fastapi-off-core-path branch December 23, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants