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

write the metadata file once after refreshing all flags #200

Closed
wants to merge 1 commit into from

Conversation

devinlane
Copy link

The DelayedMetadataSerializer works excellently during message download, but the FlagRefresher uses Serializer without any batching or transaction, causing the metadata file to be written for each message. For my backup of ~50k messages, this produces a rather large amount of disk writes (~20GB for INBOX alone).

I've updated the FlagRefresher to do the refresh work inside a Serializer transaction, which I've implemented to do transactions on both mbox and imap metadata.

In my testing this makes a incremental mirror backup take < 1 min with almost no disk writes.

@joeyates
Copy link
Owner

Hi @devinlane

Thanks for the PR, it addresses an area that wasn't previously handled - slow flag refreshes.

I decided to follow you lead, but to implement in a different way, by moving the flag refresher call inside the existing transaction block. This way it follows the existing 2 strategy approach.

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