Reduce memory footprint of SDK by separating namespace imports
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
首先检查 SDK 当前如何导入其命名空间模块,尤其关注 team 和 team_log 命名空间。比较单独导入命名空间与延迟加载,并将降低内存使用量且不破坏现有 SDK 行为作为完成标准。
由索引模型根据 Issue 内容生成。
描述
Why is this feature valuable to you? Does it solve a problem you're having?
The Dropbox API and SDK cover a large range of functionality while some apps only use a small subset. This may be particularly true for some namespaces such as team and team_log which require different Dropbox subscriptions.
Importing all modules to cover the full API requires a relatively large amount of memory (~30 MB without 3rd party modules such as requests). A large fraction of this actually comes from the team_log namespace.
Describe the solution you'd like
Would it be possible to have separate classes for different namespaces and import modules only as needed? This of course would be a major change in design and may deviate from how other Dropbox SDKs handle this. Nevertheless, it may be worth considering, especially as new namespaces to support an evolving product will be added in the future.
Describe alternatives you've considered
Lazy loading of modules, at the point of use, may be an alternative.
- 主要语言
- Python
- 星标
- 986
- 派生
- 332
- 平均合并
- 7 小时 7 分钟
- 30 天内合并 PR
- 10
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dropbox/dropbox-sdk-python 的其他 Issue
-
question
难度 4/5 3-5 天 新手友好度 35/100
dropbox/dropbox-sdk-python#585 · 4 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
dropbox/dropbox-sdk-python#491 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 3/5 1-2 天 新手友好度 35/100
dropbox/dropbox-sdk-python#482 · 1 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
question
难度 5/5 一周以上 新手友好度 25/100
dropbox/dropbox-sdk-python#476 · 3 条评论 ·
维护者通常 1 天内回复
-
bug
难度 5/5 一周以上 新手友好度 20/100
dropbox/dropbox-sdk-python#475 · 1 条评论 ·
维护者通常 1 天内回复
查看 dropbox/dropbox-sdk-python 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
-
难度 1/5 1 小时以内 新手友好度 92/100
QuantEcon/lecture-python-programming#642 ·
维护者通常 1 天内回复
-
area/config area/profiles comp/cli needs-decision P3 sweeper:risk-compatibility type/feature
难度 2/5 1-3 小时 新手友好度 82/100
NousResearch/hermes-agent#133697 ·
维护者通常 1 天内回复
-
enhancement needs-triage
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复
-
core
难度 2/5 1-3 小时 新手友好度 88/100
vectorize-io/hindsight#5279 ·
维护者通常 1 天内回复