"timestamp" parameter delay

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
Norn
Posts: 521
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;
Windows 11 24H2 @100% 2560x1440

admin
Site Admin
Posts: 67229
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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: 521
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
Here is the result of selecting a file in a folder of 1000 files and executing it:
1000 items delay.png
To see the attached files, you need to log into the forum.
Last edited by Norn on 30 Nov 2022 20:44, edited 2 times in total.
Windows 11 24H2 @100% 2560x1440

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

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: 521
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
Paper folder:
Paper folder 2000.png
To see the attached files, you need to log into the forum.
Windows 11 24H2 @100% 2560x1440

Post Reply