"timestamp" parameter delay

Things you’d like to miss in the future...
Post Reply
Norn
Posts: 416
Joined: 24 Oct 2021 16:10

"timestamp" parameter delay

Post by Norn »

The greater the number of files in the list, the longer it takes to restore the timestamp, when $i<1000 the delay is 172.

Code: Select all

new("Test", dir);
 goto "<curpath>\Test";

 for($i=0; $i<100; $i++) {
     new($i.txt)
     }

 $modified = property("#date.m", <curitem>);
 writefile("<curitem>:Tags", "Test", , "utf8bom");
 $start = now("msecs");
 showstatus 0;
 timestamp "m", $modified, <curitem>;} 
 status now("msecs") - $start;
Win10, Win11 @100% 2560x1440 22H2

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

Re: "timestamp" parameter delay

Post by admin »

Is that air code? Please look at it again and come up with a presentable example.

Norn
Posts: 416
Joined: 24 Oct 2021 16:10

Re: "timestamp" parameter delay

Post by Norn »

Sorry, the following are the detailed steps and results.
Create a folder with 50 files:

Code: Select all

new("Test50", dir);
 goto "<curpath>\Test50";

 for($i=0; $i<50; $i++) {
     new($i.txt);
     wait "1";
     }
Create another folder with 2000 files:

Code: Select all

new("Test2000", dir);
 goto "<curpath>\Test2000";

 for($i=0; $i<2000; $i++) {
     new($i.txt);
     wait "1";
     }
Select a file in each folder and execute the "timestamp" parameter respectively:

Code: Select all

 $modified = property("#date.m", <curitem>);   //Get modified time

 $start = now("msecs");   //Get current time
 timestamp "m", $modified, <curitem>;}   //Execute the timestamp parameter
 status "Delay is " . now("msecs") - $start . "ms";   //Calculate the time taken for "Execute the timestamp parameter"
Here is the result of selecting a file in a folder of 50 files and executing it:
50 items delay.png
50 items delay.png (1.32 KiB) Viewed 216 times
Here is the result of selecting a file in a folder of 1000 files and executing it:
1000 items delay.png
1000 items delay.png (2.01 KiB) Viewed 216 times
Last edited by Norn on 30 Nov 2022 20:44, edited 2 times in total.
Win10, Win11 @100% 2560x1440 22H2

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: "timestamp" parameter delay

Post by highend »

Can't reproduce that. ~32 ms, regardless if I selected the first / the last file in a dir with 50 / 1000 files...
One of my scripts helped you out? Please donate via Paypal

Norn
Posts: 416
Joined: 24 Oct 2021 16:10

Re: "timestamp" parameter delay

Post by Norn »

Weird, I can only reproduce it now in paper folder. not sure if this is an issue?
Normal folder:
folder 2000 files.png
folder 2000 files.png (1.92 KiB) Viewed 189 times
Paper folder:
Paper folder 2000.png
Paper folder 2000.png (2.07 KiB) Viewed 189 times
Win10, Win11 @100% 2560x1440 22H2

Post Reply