Renaming hundreds of files - how fast?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
zer0
Posts: 2676
Joined: 19 Jan 2009 20:11

Renaming hundreds of files - how fast?

Post 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 :?
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build

admin
Site Admin
Posts: 66324
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Renaming hundreds of files - how fast?

Post by admin »

Could you repeat it? I would guess it was a one time Windows thing.

zer0
Posts: 2676
Joined: 19 Jan 2009 20:11

Re: Renaming hundreds of files - how fast?

Post 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.
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build

admin
Site Admin
Posts: 66324
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Renaming hundreds of files - how fast?

Post 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...

zer0
Posts: 2676
Joined: 19 Jan 2009 20:11

Re: Renaming hundreds of files - how fast?

Post 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?
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build

admin
Site Admin
Posts: 66324
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Renaming hundreds of files - how fast?

Post 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...

zer0
Posts: 2676
Joined: 19 Jan 2009 20:11

Re: Renaming hundreds of files - how fast?

Post 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 8)
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build

Linkaday
Posts: 392
Joined: 06 Aug 2007 14:40
Location: Hamburg, Germany - Win 11 Home v25H2 x64 1920x1080 (100%)

Re: Renaming hundreds of files - how fast?

Post 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

Post Reply