image
image

Go Back   macosx.com > Design, Media, Programming & Scripting > Software Programming & Web Scripting

Reply
 
LinkBack Thread Tools
  #9  
Old March 25th, 2008, 11:04 PM
Captain Code's Avatar
Moderator
 
Join Date: Aug 2001
Location: Ontario, Canada
Posts: 3,119
Thanks: 0
Thanked 4 Times in 1 Post
Captain Code will become famous soon enough
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
Reply With Quote
  #10  
Old March 31st, 2008, 05:20 AM
Mikuro's Avatar
Crotchety UI Nitpicker
 
Join Date: Mar 2005
Posts: 2,682
Thanks: 6
Thanked 53 Times in 48 Posts
Mikuro will become famous soon enough
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.
__________________
Mac mini — 1.25GHz G4, 1GB RAM — OS 10.5.8

Useful programs: Privoxy, Butler, ffmpegX, VLC, Perian, Tofu, Wcalc
Reply With Quote
  #11  
Old May 12th, 2008, 08:21 PM
Mikuro's Avatar
Crotchety UI Nitpicker
 
Join Date: Mar 2005
Posts: 2,682
Thanks: 6
Thanked 53 Times in 48 Posts
Mikuro will become famous soon enough
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.
__________________
Mac mini — 1.25GHz G4, 1GB RAM — OS 10.5.8

Useful programs: Privoxy, Butler, ffmpegX, VLC, Perian, Tofu, Wcalc
Reply With Quote
  #12  
Old May 13th, 2008, 02:39 AM
Viro's Avatar
Registered User
 
Join Date: Nov 2003
Location: Oxford, UK
Posts: 2,494
Thanks: 0
Thanked 2 Times in 2 Posts
Viro will become famous soon enoughViro will become famous soon enough
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.
Reply With Quote
  #13  
Old May 13th, 2008, 04:15 PM
Mikuro's Avatar
Crotchety UI Nitpicker
 
Join Date: Mar 2005
Posts: 2,682
Thanks: 6
Thanked 53 Times in 48 Posts
Mikuro will become famous soon enough
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.
__________________
Mac mini — 1.25GHz G4, 1GB RAM — OS 10.5.8

Useful programs: Privoxy, Butler, ffmpegX, VLC, Perian, Tofu, Wcalc
Reply With Quote
Reply

Bookmarks

Tags
backups, backupsdb, programming, time machine

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


All times are GMT -5. The time now is 06:17 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.