Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce memory footprint of SDK by separating namespace imports #269

Open
samschott opened this issue Oct 12, 2020 · 1 comment
Open

Reduce memory footprint of SDK by separating namespace imports #269

samschott opened this issue Oct 12, 2020 · 1 comment

Comments

@samschott
Copy link
Contributor

samschott commented Oct 12, 2020

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.

@greg-db
Copy link
Contributor

greg-db commented Oct 13, 2020

Thanks for writing this up! I can't make any promises, but I'll share this request with the team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants