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

[feature/mem-optimizations] Optimize memory usage #121

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

felix-schwarz
Copy link
Collaborator

@felix-schwarz felix-schwarz commented Oct 1, 2024

Description

This PR reduces the memory consumption of the SDK.

Opportunities

  • save avatar data (which can grow large quickly) as separate files rather than as part of OCBookmarks which are kept in memory
  • thin out class setting metadata in low memory configuration

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@CLAassistant
Copy link

CLAassistant commented Oct 1, 2024

CLA assistant check
All committers have signed the CLA.

- OCBookmark:
	- add `metaDataStorageURL` property for transitioning data from internal/memory to external/disk storage
	- if `metaDataStorageURL` is set, externalize avatar/avatarData and load it only on demand for as short as possible
	- keep track of whether an avatar has been stored via avatarDataURL
- OCBookmarkManager
	- add code to transition bookmarks from internal to external storage
	- add code to store changed and transitioned data to external storage
- effectively disable caching in minimum memory configuration for OCCore's thumbnail cache and OCResourceManager's OCResource cache
@felix-schwarz felix-schwarz force-pushed the feature/mem-optimizations branch from 8d01f6e to e57ad35 Compare November 28, 2024 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants