G'day Lady Aleena,
The answer is going to depend on the size of your files and how many of them have changed; however, unless you have masses and masses of data to backup any only a very, very tiny amount hasn't changed, I would be extremely surprised if the time taken by calls to stat was in any way a limiting factor compared to the amount of time taken to move data between drives (C: to J:). So, while I don't have details on your data, either in terms of size or modifications, I would generally expect an incremental backup to take less time than a full backup.
You could speed up your script a bit by removing the get_mod_time() subroutine and rewriting same_mod_time() as:
sub same_mod_time { (stat($_[0]))[9] == (stat($_[1]))[9] }
However, the backup process is I/O bound and I doubt that would really have any noticeable affect.
If you're interested, here's my test for that code:
-- Ken
In reply to Re: Will checking last modified date take more time than just overwriting?
by kcott
in thread Will checking last modified date take more time than just overwriting?
by Lady_Aleena
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |