On Fri, 4 Feb 2011 22:44:31 +0100, Karel Zak <kzak@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@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@intel.com