GPGTools/GPGMail — pull request #7 by idodeclare (2012-03-05 23:33:15+00:00)
Title: Optimize search for PGP markers, on advice from Instruments

- very noticeable speed improvement, particularly on large attachments
- searches for "-----END PGP..." should not start from position 0; instead
continue search after the "-----BEGIN PGP..." position
- attachmentMightBePGPEncrypted and attachmentMightBePGPSignature are
folded into one search to avoid redundancy
- as before, only "pgp", "gpg", "asc", and "sig" are recognized
extensions; but the previous code was doing an unnecessary search for
a PUBLIC KEY BLOCK in every type of file
- do not do redundant conversions from NSData to decoded strings
- add unit tests to validate changes--with a BundleTestRunner app to
load GPGMail.mailbundle

- post-build script tells Mail to save and quit

Please note: after hours of trying, I could not get BundleTestRunner to run
from the "Test" action. It only loads GPGMail.mailbundle correctly in the
"test after build" mode.