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 allocation in pendulum 3.0 #857

Open
cody-scott opened this issue Nov 1, 2024 · 5 comments
Open

High memory allocation in pendulum 3.0 #857

cody-scott opened this issue Nov 1, 2024 · 5 comments

Comments

@cody-scott
Copy link

  • [x ] I am on the latest Pendulum version.

  • [x ] I have searched the issues of this repo and believe that this is not a duplicate.

  • OS version and name: Debian GNU/Linux 12 (bookworm)

  • Pendulum version: 3.0.0

Issue

In pendulum 3.0.0 it is allocating a large amount of memory for the library (up to 1gb). In prior versions, memory allocation was usually less than 2 mb for the same import. Possibly due to rust re-write?

tested/validated using memray with both pendulum==3.0.0 and pendulum==2.1.2

flame_graphs.zip

@cody-scott cody-scott changed the title High memory allocation in pendulum 3.0+ High memory allocation in pendulum 3.0 Nov 1, 2024
@Secrus
Copy link
Collaborator

Secrus commented Nov 21, 2024

That is troubling. I don't know too much about Rust, but I am open to accepting PRs that implement improvements on that front.

@cody-scott
Copy link
Author

I think one first step would be to see if anyone else sees the same results I get when profiling. I tested in windows/linux and saw similar results, but would be great to confirm its not just a "me" issue.

@protoss-player
Copy link

I think one first step would be to see if anyone else sees the same results I get when profiling

Actually, I got the exactly same memory consumption issue with memray and ended up here.

@s-rigaud
Copy link

I'm getting segfault inside a docker container as fastapi_cache is based over pendulum and memory consumption is way higher than before.

@Secrus
Copy link
Collaborator

Secrus commented Dec 17, 2024

@cody-scott any chance you could test the latest master branch? I have merged some changes to the Rust-Python code and I suspect it might be the answer to this issue (at least partially)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants