dropbox / dropbox/dropbox-sdk-python
Reduce memory footprint of SDK by separating namespace imports
- 主要语言
- Python
- 星标
- 983
- 派生
- 330
- 平均合并
- 3 分钟
- 30 天内合并 PR
- 10
描述
**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.
贡献指南
调研方向
首先检查 SDK 当前如何导入其命名空间模块,尤其关注 team 和 team_log 命名空间。比较单独导入命名空间与延迟加载,并将降低内存使用量且不破坏现有 SDK 行为作为完成标准。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- api
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100