|
#9
| ||||
| ||||
|
I used NSFileManager's enumeratorAtPath as well. It's not bad performance but I didn't try as many files as you are. I tried it with my program by scanning my entire applications folder and XCode folder and it took a few minutes to complete and found over 5000 executable files. That's pretty decent I'd say.
__________________ MacBook Pro 2.16GHz Core2Duo 3GB RAM, G4 1.4GHz OSX Tiger 1.25GB RAM, Dual 2GHz G5 OSX Tiger 2GB RAM (freakin shweet) Athlon 64 Windoze XP for school work (programming) 1GB RAM dferns@macosx.com |
|
#10
| ||||
| ||||
|
I just noticed something interesting. In Disk Utility's "verify disk" routine, one of the steps is "checking multi-linked files". And this step completes rather quickly. Hmm. What exactly is it doing in that step, and how? Maybe it's nothing useful, but it caught my attention. Edit: I just noticed that another step is "Checking multi-linked directories". Since you can't make hard links to directories (AFAIK), this makes me wonder if they mean something else entirely. |
|
#11
| ||||
| ||||
|
I'd put this project of mine on hold for a while, and I now realize that was for the best; apparently there is a perfectly fast way to do what I need. I'm not sure exactly what it is, but tms does it. It's a command-line tool for processing Time Machine backups. You can use it to, among other things, find the differences between two snapshots, and it does it virtually instantly.
|
|
#12
| ||||
| ||||
|
Well, the initial processing of all the files will take a substantial amount of time. Assuming you have 500,000 unique files out of 20 million, you are still going to have to compare each of those unique files with each of the files. There's no way around that unless you know something about the snapshot (e.g. you short circuit the comparison by comparing the differences only, time machine stores a change log of sorts). If tms is doing it instantly, it must be using some info about time machine snapshots that we're not aware off. |
|
#13
| ||||
| ||||
|
Yes, so it seems. I notice now that there's an invisible ".Backup.log" file in every snapshot folder. However, it doesn't contain data on individual files. It just says when it was started, how many files were copied, how much disk space was used, and any errors that occurred (on an unrelated note, I'm a little unnerved by how many files it says it could not copy since it never alerted me to the fact; fortunately it just seems to be apps, not personal files). The good news is that it looks like I can just base my program on tms and save myself a lot of trouble. |
![]() |
| Bookmarks |
| Tags |
| backups, backupsdb, programming, time machine |
| Thread Tools | |
|
|