Skip to content

perf: lazy-load generated filter cache on startup#41

Merged
jaromil merged 4 commits intomasterfrom
startup-lazy-filter-cache
May 1, 2026
Merged

perf: lazy-load generated filter cache on startup#41
jaromil merged 4 commits intomasterfrom
startup-lazy-filter-cache

Conversation

@jaromil
Copy link
Copy Markdown
Member

@jaromil jaromil commented May 1, 2026

Summary

  • stop sourcing $MAILDIRS/cache/filters when loading the filters library
  • add load_filter_cache and call it only from filter/sieve paths that need generated filter arrays
  • move runtime checks after command parsing and scope them to commands that need keyring, GnuPG, fetchmail, msmtp, or mutt
  • remove duplicate colors initialization from bootstrap
  • avoid creating/touching the mblaze sequence directory at startup; initialize it lazily before mblaze commands run
  • disable mutt's GPGME/S/MIME auto handling by default so attached smime.p7s signatures fail fast instead of blocking message opening
  • refresh the GPG agent TTY before invoking pass, so !jaro send from inside mutt can decrypt the stored SMTP password instead of prompting again

Measured locally

  • before: installed jaro -q source addr around 20s on the real mailbox
  • after lazy filter cache: source-tree jaro -q source addr around 0.05s
  • after scoped checks/lazy mblaze: source-tree jaro -q source addr around 0.04s
  • source-tree jaro -q -a jaromil@dyne.org askpass remains under 1s

Validation

  • make
  • zsh extras/test/run-source.sh
  • zsh extras/test/test-mutt-crypto.sh
  • zsh extras/test/test-filtering.sh
  • zsh extras/test/test-sieve-import.sh
  • zsh extras/test/test-maildir-commands.sh
  • zsh extras/test/test-addressbook-parse.sh
  • zsh extras/test/test-account-wizard.sh

@jaromil jaromil merged commit 27b3a9b into master May 1, 2026
1 check passed
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.

1 participant