Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

novetan

macrumors 6502
Original poster
Sep 3, 2010
390
10
I realised copying and paste a "folder" consisting of many photos will take much lesser time than copying and paste those "individual photos" inside the same folder. Its the same file size. Why there is a difference in timing?
 

Gregg2

macrumors 604
May 22, 2008
7,189
1,179
Milwaukee, WI
Is it fewer motions to drag and drop the folder once rather than several time to do the files individually that saves time? Or, are you saying that the actual copying time is longer?
 

scorpio vega

macrumors 65816
May 3, 2023
1,217
1,502
Raleigh, NC
I realised copying and paste a "folder" consisting of many photos will take much lesser time than copying and paste those "individual photos" inside the same folder. It’s the same file size. Why there is a difference in timing?
This may answer your question

 

novetan

macrumors 6502
Original poster
Sep 3, 2010
390
10

Basic75

macrumors 68000
May 17, 2011
1,938
2,252
Europe
I believe that copying a folder is faster than copying the files individually because the copy-on-write feature of APFS just needs to handle the one folder instead of doing all the files individually. Are you using APFS? Can somebody confirm that copy-on-write works for directories, too?
 

novetan

macrumors 6502
Original poster
Sep 3, 2010
390
10
I believe that copying a folder is faster than copying the files individually because the copy-on-write feature of APFS just needs to handle the one folder instead of doing all the files individually. Are you using APFS? Can somebody confirm that copy-on-write works for directories, too?
Lol. I don't know what is APFS. If I can get to that level of understanding I may not needed to ask such question.

At least now there are confirmations my findings are correct. So nothing wrong with my com
 

gilby101

macrumors 68020
Mar 17, 2010
2,469
1,332
Tasmania
This may answer your question
No...
I realised copying and paste a "folder" consisting of many photos will take much lesser time than copying and paste those "individual photos" inside the same folder. Its the same file size. Why there is a difference in timing?
For an APFS file system, copying a file between folders on the same disk does not involve copying any data. Involves creating new file entries (inodes) pointing to the same data. So is fast. Hence file size does not matter.
Any difference in timing would be that it is quicker to duplicate the folder structure compared with duplicating all the file structures.
Both operations seem to be very fast - either copy and paste a folder or copy and paste the files.
 
  • Like
Reactions: Basic75

gilby101

macrumors 68020
Mar 17, 2010
2,469
1,332
Tasmania
A normal hard link creates a new dentry to an existing inode, are you sure that APFS needs a new inode for a copy-on-write file?
Yes. Nothing to do with hard links. With hard links the data is the same for ever - change one hard linked file and the other file is changed. After an APFS copy, the two files have an independent existence - future changes apply to each file separately.

See "clone" files here: https://eclecticlight.co/2020/04/14/copy-move-and-clone-files-in-apfs-a-primer
 
  • Like
Reactions: Brian33 and Basic75

Basic75

macrumors 68000
May 17, 2011
1,938
2,252
Europe
Yes. Nothing to do with hard links. With hard links the data is the same for ever - change one hard linked file and the other file is changed. After an APFS copy, the two files have an independent existence - future changes apply to each file separately.
They could have layered clones on hard links, lazily creating the new inode on first write, but I just tested it and you are right
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.