modelcontextprotocol / modelcontextprotocol/java-sdk

Optimization - avoid unnecessary payload copy when deserializing

未關閉
#156 12 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

enhancement P2 ready for work
主要語言
Java
星號
3.7k
分支
1.1k
平均合併
1 天 15 小時
30 天內合併 PR
9

描述

This issue suggests creating a JSON deserialization variant that consumes an InputStream without the need for a String copy of the HTTP request payload, reducing the GC pressure and improving overall performance.

Expected Behavior

Efficient correct HTTP
bad user data should return 400

Current Behavior

Bad data returns 5xx
Extrac copies of JSON messages are created in memory

Context

More memory pressure,
harder to debug


(edit by @chemicL)
The PR addressing this is #157

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

先檢視 issue 指出負責這項工作的 PR #157,並追蹤它所修改的 HTTP 反序列化進入點。完成標準是支援以 InputStream 為基礎的反序列化,且不產生不必要的 String 複本;對錯誤的使用者資料回傳 400,而不是 5xx;使用 PR 中的測試驗證相關行為。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
api, backend
Issue 類型
重構
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
20/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。