microsoftgraph / microsoftgraph/msgraph-sdk-python

Improve execution time on Model deserialization

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

還沒有人認領這個 Issue。

enhancement
主要語言
Python
星號
630
分支
96
平均合併
15 小時 20 分鐘
30 天內合併 PR
3

描述

So I tried to migrate our usage of raw API calls to Microsoft Graph to your new release 1.1.0.
And I measured execution time with the bare-bones method time.time() before method call, time.time() after method call.

I've tried performing get requests for the endpoints: me, users, domains.

The results were that the sdk is on average 3.5 times slower than the raw call to API which I think a great deal.

Furthermore, I was curios where this overhead came from and I searched through the code with debug.
And the most time spent in execution is after the call to the rest api, when the sdk is building a model by deserializing the json object got from the request in a sdk specific object.

This execution time difference lead me to decide that I should postpone the migration until this is improved or fixed.

貢獻指南

開啟貢獻指南

從這裡開始

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

研究方向

首先追蹤 REST 回應後 SDK 的模型反序列化流程,issue 將其識別為開銷的主要來源。針對 me、users 和 domains 端點重現報告中的比較;當能夠證明相較於直接 API 呼叫,執行時間有可量測的減少時,即視為完成。

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

評估

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

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

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