CC.Net File System Source Control speed up

| 0 Comments

Yesterday I mentioned that the file system source control provider in CC.Net was a little inefficient. I speculated as to how it might be working and how it might be improved. Well, as the saying goes, assume makes an ass out of you and me...

The file system source control provider is actually far far simpler than I expected. It scans the 'repository' file system tree and simply looks for files that have been written to since the last check. If it finds these files it builds modification details for them and then returns. When asked to "check out the changes" it simply copies the entire source tree to the destination... I've already added functionality to allow you to say that you'd like to remove deleted files, but I hadn't really tested it and don't actually use it, and it's broken as the file system provider wont spot a single delete as it only works on newer files... :(

Anyway... The provider can be made slightly more efficient by checking the sub directory write times as well as just file write times, with that in place you can skip most of the file checking if a directory says that it hasn't been modified. I've done that and also added the ability to give it sub directories that it should completely ignore (useful for CVS 'state' directories and build output directories), I know that I can do this using the filter provider but it's more efficient to skip these directories during the file scan phase rather than after...

Leave a comment