Re: Please Explain the Speed Difference here.
- From: "Alan Carre" <alan@xxxxxxxxxxxxxxxxx>
- Date: Mon, 8 Dec 2008 01:55:17 +0700
"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
.
- Follow-Ups:
- Re: Please Explain the Speed Difference here.
- From: Tommy
- Re: Please Explain the Speed Difference here.
- From: Alexander Grigoriev
- Re: Please Explain the Speed Difference here.
- References:
- Please Explain the Speed Difference here.
- From: Tommy
- Re: Please Explain the Speed Difference here.
- From: Tommy
- Please Explain the Speed Difference here.
- Prev by Date: Re: PE verification
- Next by Date: Re: The memory can not be written.
- Previous by thread: Re: Please Explain the Speed Difference here.
- Next by thread: Re: Please Explain the Speed Difference here.
- Index(es):
Relevant Pages
|