Skip to content

perf(adk): reduce tracing serialization overhead#358

Merged
Abhijeet Prasad (AbhiPrasad) merged 2 commits intomainfrom
abhi-perf-adk-tracing-capture
Apr 28, 2026
Merged

perf(adk): reduce tracing serialization overhead#358
Abhijeet Prasad (AbhiPrasad) merged 2 commits intomainfrom
abhi-perf-adk-tracing-capture

Conversation

@AbhiPrasad
Copy link
Copy Markdown
Member

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) commented Apr 27, 2026

Capture ADK request, config, and event fields directly instead of deep-copying entire objects on tracing paths. Preserve extra dict config fields while still serializing Pydantic schemas for logged config readability.

 ┌────────────────────────────────────────────┬─────────────┬──────────────────┬────────────────┐
 │ Path                                       │ main        │ branch           │ effect         │
 ├────────────────────────────────────────────┼─────────────┼──────────────────┼────────────────┤
 │ Request capture, normal config             │ ~33.7 µs/op │ ~6.8 µs/op       │ ~5.0x faster   │
 ├────────────────────────────────────────────┼─────────────┼──────────────────┼────────────────┤
 │ Request capture with Pydantic schema class │ ~33.3 µs/op │ ~7.2 µs/op       │ ~4.6x faster   │
 ├────────────────────────────────────────────┼─────────────┼──────────────────┼────────────────┤
 │ Event output merge                         │ ~3.36 µs/op │ ~0.28–0.29 µs/op │ ~11–12x faster │
 └────────────────────────────────────────────┴─────────────┴──────────────────┴────────────────┘

Capture ADK request, config, and event fields directly instead of deep-copying entire objects on tracing paths. Preserve extra dict config fields while still serializing Pydantic schemas for logged config readability.

Verified with targeted ADK capture_config and call-type tests.
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) merged commit 91124f8 into main Apr 28, 2026
82 checks passed
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) deleted the abhi-perf-adk-tracing-capture branch April 28, 2026 17:19
Abhijeet Prasad (AbhiPrasad) added a commit that referenced this pull request Apr 29, 2026
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

Successfully merging this pull request may close these issues.

2 participants