Page 1 of 1
Renaming hundreds of files - how fast?
Posted: 03 Aug 2009 15:04
by zer0
I'm curious, what sort of factors affect how fast XY can rename files? Apart from quantity of the files and the complexity of the renaming function that is applied. Yesterday, I had to rename a few hundred files using the "rename as curfolder" script and it froze on me for quite a while, before returning to the "alive" state with the renaming done. I know that "quite a while" isn't very exact, but I didn't time it, just went back to doing what I was doing. While I don't rename so many files on everyday basis, I'm also not used to XY freezing on me, so that makes me wonder why it hangs

Re: Renaming hundreds of files - how fast?
Posted: 03 Aug 2009 15:14
by admin
Could you repeat it? I would guess it was a one time Windows thing.
Re: Renaming hundreds of files - how fast?
Posted: 03 Aug 2009 16:02
by zer0
admin wrote:Could you repeat it? I would guess it was a one time Windows thing.
Yep, I could repeat it. I looped to create a few hundred empty text files and then applied the renaming script. The whole process went quicker, though XY still froze for a while, but I'm guessing that's due to those files showing as 0 KB.
Re: Renaming hundreds of files - how fast?
Posted: 03 Aug 2009 16:29
by admin
zer0 wrote:admin wrote:Could you repeat it? I would guess it was a one time Windows thing.
Yep, I could repeat it. I looped to create a few hundred empty text files and then applied the renaming script. The whole process went quicker, though XY still froze for a while, but I'm guessing that's due to those files showing as 0 KB.
OK, the time grows exponentially since each item to be renamed has be compared with each other item to be renamed to avoid collisions, and with each other item in the target folder. For 500 files this is quite some work...
Re: Renaming hundreds of files - how fast?
Posted: 03 Aug 2009 16:44
by zer0
admin wrote:OK, the time grows exponentially since each item to be renamed has be compared with each other item to be renamed to avoid collisions, and with each other item in the target folder. For 500 files this is quite some work...
Yep, that's what I imagined. For 500 items, it ends up being nearly a quarter of a million comparisons. Will a fast CPU give you more crunching power in this situation or this sort of operation isn't scalable so its speed is limited internally?
Re: Renaming hundreds of files - how fast?
Posted: 03 Aug 2009 16:54
by admin
zer0 wrote:admin wrote:OK, the time grows exponentially since each item to be renamed has be compared with each other item to be renamed to avoid collisions, and with each other item in the target folder. For 500 files this is quite some work...
Yep, that's what I imagined. For 500 items, it ends up being nearly a quarter of a million comparisons. Will a fast CPU give you more crunching power in this situation or this sort of operation isn't scalable so its speed is limited internally?
No, CPU won't help much. It's rather a matter of harddisk speed and file system caching. It also depends on the particular rename job. Some do not need this check and are much faster. I also might have missed out some possible optimizations -- you must draw a line somewhere...
Re: Renaming hundreds of files - how fast?
Posted: 03 Aug 2009 17:43
by zer0
admin wrote:No, CPU won't help much. It's rather a matter of harddisk speed and file system caching. It also depends on the particular rename job. Some do not need this check and are much faster. I also might have missed out some possible optimizations -- you must draw a line somewhere...
Thanks Don. As I said, it's not a big deal, more like my curiosity getting the better of me. Save for this rename and the infamous Vista copying issue XYplorer doesn't normally freeze for me, so nothing but a thumbs up for me

Re: Renaming hundreds of files - how fast?
Posted: 03 Aug 2009 21:01
by Linkaday
That's the occasion to do some clearing on my web collection folder:
C:\Downloads\Images\, 1.551/1.564 items (48,28 GB free), total: 258,62 MB (271.179.310 bytes)
Almost all names contain at least one dot and a leading <www.> (because of Maxthon's convenient and fast one-click save) - so why not select them all Ctrl+A and let my simple s&r renaming scripts "cut 3w" and "dots2underline" do the rest. I had the stop watch ready, but before i had a chance to move my cursor from the catalog to the watch, XY had done it all, ready for action - just the HD did some writing behind.
w2k SP4 - AMD XP 2200+ (which is actually 1,8 GHz) - WD Caviar UDMA-100 7200rpm - so nothing special