Over all: 30.000 files in a 8GB ram disk.R:\1-800x600-110.jpg
R:\1-1024x768-110.jpg
R:\1-1920x1024-110.jpg
R:\2-800x600-110.jpg
R:\2-1024x768-110.jpg
R:\2-1920x1024-110.jpg
...
R:\30000-1920x1024-110.jpg
Written to disk = 253 KB.
Code: Select all
$resolutions = formatlist(replace(regexmatches($selectedFiles, "-\d+x\d+-"), "-"), "dents");Code: Select all
$resolutions = formatlist(regexreplace(regexmatches($selectedFiles, "-\d+x\d+-"), "-"), "dents");So replace() can be about ~750 times slower than regexreplace()...
It's just a comparison between replace / regexreplace in the end I switched to a slightly modified command:
Code: Select all
$resolutions = formatlist(regexreplace($selectedFiles, "^.*?-(\d+x\d+)-.*?(\r?\n|$)", "$1|"), "dents");
XYplorer Beta Club