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

Horrible memory footprint... #11

Open
false-vacuum opened this issue Mar 8, 2025 · 5 comments
Open

Horrible memory footprint... #11

false-vacuum opened this issue Mar 8, 2025 · 5 comments

Comments

@false-vacuum
Copy link

Why does just importing this use 500+ mib of memory? That's insane.

Steps to reproduce

  • check memory usage.
  • Import vapi
from vapi import Vapi
  • Check memory usage.
  • You just leaked half a gig of memory.
@leandermaerkisch
Copy link

I faced the same issue. Deployment crashed because OOM error. Took a while to figure this out. Would be great if this is fixed soon

@false-vacuum
Copy link
Author

false-vacuum commented Apr 1, 2025

@leandermaerkisch The latest pydantic causes an unbounded memory leak. If you pin pydantic==2.10.6, it should fix this.... This auto-generated SDK really needs some work.

@leandermaerkisch
Copy link

That's great news, thanks a bunch @false-vacuum!

@dsinghvi
Copy link
Contributor

dsinghvi commented Apr 4, 2025

@leandermaerkisch @false-vacuum we just reduced some of the sizes of __init__.py to reduce the footprint by ~3x. We'll be making an update later to use typedicts instead of pydantic models to further reduce the memory pressure.

Sorry about the inconvenience so far!

@leandermaerkisch
Copy link

leandermaerkisch commented Apr 4, 2025 via email

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

3 participants