microsoftgraph / microsoftgraph/msgraph-sdk-python
Improve execution time on Model deserialization
还没有人认领这个 Issue。
- 主要语言
- 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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先跟踪 REST 响应之后 SDK 的模型反序列化过程,issue 将其确定为开销的主要来源。针对 me、users 和 domains 端点复现报告中的比较;当能够证明相对于直接 API 调用,执行时间有可测量的减少时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- api, performance
- Issue 类型
- 重构
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100