Re: Please Explain the Speed Difference here.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"Tommy" <bad@xxxxxxxxxxxxx> wrote in message
news:OrUhyUGWJHA.5496@xxxxxxxxxxxxxxxxxxxxxxx
Tommy wrote:
Here is what I see for a copy test of 25 files, 1/2 of them are 500 megs
each

Delete Before Copy: ~11 secs
Delete After Copy : ~3 secs
No Delete : ~8 secs

What am I missing here?

This is so odd. It is like the delete after the copy:

CopyFile(src, tar, false)
DeleteFile(tar)

This is so funny!... (not you) because I *just now* had a long long angry
discussion with a friend about how retarded Windows is with respect to
"delete" which takes FOREVER! I suggested to my friend the following new
rule "Use copy/rename instead *to delete files fast!*".

I think the reason is (probably anyway) delete means "unlink" file from the
file system. So that means a rather lengthy wait for the process of
unlinking/rebalancing etc... to complete before you're allowed to add a new
node to the tree. If you're overwriting a file then the file system (the
tree) remains the same so it's just a matter of dumping some bytes at a
specified "location" (node).

If you try Copy/Delete/Copy I'm sure you'll find the bottleneck is in the
unlinking segment (which can occur "lazily" as the last operation - ie.
unless you want to add a new node to the tree). I don't know why "no delete"
was 8ms... how many experiments did you run? Were they randomized path
names? etc etc...

It's kind of like guaging the speed of a CPU. There's no real speed, it
depends too much on the context of what's being executed.

- Alan Carre



.



Relevant Pages

  • Re: If you were inventing CoBOL...
    ... >> The underlying file system is irrelevant. ... The database would work exactly the same. ... tree nodes lived in a table. ... >Well bang goes the only advantage of lists and trees, ...
    (comp.lang.cobol)
  • Re: what defragger should i use?
    ... It reads the entire directory tree for a volume. ... Optimizes/repairs it ... In the UNIX world, the closest equivalent would be fsck, but fsck only ... Remember, Macs use HFS, which is not a UNIX-standard file system. ...
    (comp.sys.mac.apps)
  • Re: Thinking outside the box on file systems
    ... Several people have asked about how to mass move a ... tree under my idea for a new kind of file system. ... the same but the sections resolve to different names. ...
    (Linux-Kernel)
  • Re: SMBMOUNT?-Solved
    ... directory tree. ... highest level you can mount a filesystem (given the special name of 'root ... The root file system my be the only filesystem or it could just be a basic ...
    (Ubuntu)
  • Re: mount/export network file system
    ... > I try to export network file system from a PC 'tree' ... > the fstab line at frog is ... enable the nfs service on the machine tree. ... Usenix member http://www.usenix.org ...
    (Fedora)