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 REQUEST] Database migration of all accounts at launch #938

Open
felix-schwarz opened this issue Mar 24, 2021 · 1 comment
Open

Comments

@felix-schwarz
Copy link
Contributor

From time to time, the schemas of the SQLite database underpinning the client need to be adapted to meet requirements for new features. Sometimes, this includes rewriting the entire table, which can take a couple of seconds for very large accounts.

Traditionally, that migration was performed when the OCCore for an account was started, f.ex. when the user selected an account in the Files.app or the ownCloud app. But for large accounts, where migrations can take a couple of seconds, the user experience was not good, as the client seemed to "hang" or respond slowly.

PR #933 adds the ability for migrations to indicate progress. In the PR this is already used to show a progress indicator next to the selected account, until the account has finished migration.

To ensure an app extension isn't running out of memory during migration, as of PR #933 migrations are also limited to the app itself. For extensions, an error will be returned, asking the user to open the app and migrate their account.

To make that user experience even smoother, migration should ideally be performed for all accounts, in one go, at launch. Methods and APIs for this that are as lightweight as possible are already available in OCBookmark+DBMigration in the SDK.

@felix-schwarz felix-schwarz changed the title [FEATURE REQUEST] Database migration at launch [FEATURE REQUEST] Database migration of all accounts at launch Mar 24, 2021
@michaelstingl
Copy link
Contributor

PR #933 adds the ability for migrations to indicate progress. In the PR this is already used to show a progress indicator next to the selected account, until the account has finished migration.

Combine this with "vacuuming" the SQLite?

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

No branches or pull requests

2 participants