joeyates / imap-backup

Backup and Migrate IMAP Email Accounts
MIT License
1.33k stars 74 forks source link

Don't keep checking if migration is needed #158

Closed njakobsen closed 12 months ago

njakobsen commented 1 year ago

This has serious performance penalties when the imap file is large as the check is being run for each message imported. With a 20MB imap file (approximately 300,000) emails, it takes about 0.5 seconds to check the migration status on each message import.

Instead, we remember that we have checked migratability and skip the check on subsequent calls to validate!.

njakobsen commented 12 months ago

@joeyates is there anything you'd like me to add or change?

joeyates commented 12 months ago

Hi @njakobsen

I left some review comments a while ago but didn't submit the review - sorry about that! The review should now be visible.

joeyates commented 12 months ago

Merged and released as version 9.3.2.

Thank you @njakobsen !