[PATCH] new: read db_files and db_subdirs if mtime changed
Carl Worth
cworth at cworth.org
Thu Mar 10 12:01:47 PST 2011
On Fri, 4 Feb 2011 22:44:31 +0100, Karel Zak <kzak at redhat.com> wrote:
> The db_files and db_subdirs are unnecessary for unchanged directories.
...
> old version: real 0m0.053s
> new version: real 0m0.032s
Thanks Karel! What a lovely optimization.
On Sun, 27 Feb 2011 03:45:05 -0500, Austin Clements <amdragon at mit.edu> wrote:
> Looks good (faster than, but provably equivalent to the original code!
> notmuch_directory_get_child_* are side-effect free,
> db_files/db_subdirs aren't used between where they were set in the old
> code and where they are set in the new code, and db_files/db_subdirs
> are initialized to NULL when declared).
And thank you, Austin for the careful review. This kind of thing is very
helpful for me in reviewing patches. When there's a message like this on
the mailing list it makes it very easy for me to trust the patch.
I've now pushed the original patch with an updated commit message to
include Austin's review comments.
I also followed up with a subsequent commit that updates the comments
for the add_files_recursive function to match the current
implementation, (reflecting both this change and a previous change to a
strict equality test for the mtime comparison).
-Carl
--
carl.d.worth at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110310/4690b60b/attachment.pgp>
More information about the notmuch
mailing list