You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Perf: header merge allocates a fresh 4-way dict per retry attempt #262
On every request and every retry attempt, four dicts are merged into a new dict literal. Only auth_headers actually changes between attempts (fresh timestamp); the other three are loop-invariant. Per request the surplus is ~3 dict copies — small per call but allocated in the per-request hot path used by every resource method.
Build base = {**config_extra, **per_call_extra, **body_headers} once before the retry loop, then merged = {**base, **auth_headers} per attempt — saves N-1 merges over retries and is also clearer about which layer changes.
Activity
perf(transport): hoist invariant header merge out of retry loop
polish(transport): async close cancellation-safe + _delete_with_body …