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

High Memory Usage #16472

Open
aaazzam opened this issue Dec 21, 2024 · 1 comment
Open

High Memory Usage #16472

aaazzam opened this issue Dec 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@aaazzam
Copy link
Collaborator

aaazzam commented Dec 21, 2024

Bug summary

Using uv and memray we can run

uvx --with prefect memray run --force --output flow.bin --force -c "from prefect import flow" \
&& uvx memray flamegraph --force flow.bin \
&& open memray-flamegraph-flow.html 

and look at the corresponding flamegraph. You'll notice importing flow allocates ~1GB+ in memory to simply import flow, of which ~50MB stems from Prefect "primitives" whereas a whopping 1GB comes from Pendulum.

Version info

Version:             3.1.9
API version:         0.8.4
Python version:      3.10.14
Git commit:          e1fe7943
Built:               Fri, Dec 20, 2024 4:33 PM
OS/Arch:             darwin/arm64
Profile:             local
Server type:         server
Pydantic version:    2.10.4

Additional context

No response

@cicdw
Copy link
Member

cicdw commented Dec 21, 2024

Pendulum is also holding us back from 3.13 support at the moment (ref issue: pydantic/pydantic-extra-types#239).

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

No branches or pull requests

2 participants