performance write up (#18296)

This commit is contained in:
Alexsander Hamir 2025-12-20 12:30:17 -08:00 committed by GitHub
parent acadaca7e7
commit 52fc18ec9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,6 +56,16 @@ pip install litellm==1.80.11
---
### Performance: 50% Reduction in Memory Usage and Import Latency for the LiteLLM SDK
We've completely restructured `litellm.__init__.py` to defer heavy imports until they're actually needed, implementing lazy loading for **109 components**.
This refactoring includes **41 provider config classes**, **40 utility functions**, cache implementations (Redis, DualCache, InMemoryCache), HTTP handlers, logging, types, and other heavy dependencies. Heavy libraries like tiktoken and boto3 are now loaded on-demand rather than eagerly at import time.
This makes LiteLLM especially beneficial for serverless functions, Lambda deployments, and containerized environments where cold start times and memory footprint matter.
---
## New Providers and Endpoints
### New Providers (4 new providers)