Cache Length Column [Asynchronous (non-blocking) List Columns]
Cache Length Column [Asynchronous (non-blocking) List Columns]
The List can load most of the standard columns very fast.
But some columns are just slow: Folder Size, Length, Hash.
Fortunately we have cache for the folder sizes which is great, but not for the other ones.
We also have custom columns with infinite possibilities that can easily be as slow. Is it possible to make the List show the slow Columns instantly (with empty placeholders) and fill the data asynchronously when it's ready instead of blocking the UI and breaking the experience while waiting for ALL the data before showing anything?
But some columns are just slow: Folder Size, Length, Hash.
Fortunately we have cache for the folder sizes which is great, but not for the other ones.
We also have custom columns with infinite possibilities that can easily be as slow. Is it possible to make the List show the slow Columns instantly (with empty placeholders) and fill the data asynchronously when it's ready instead of blocking the UI and breaking the experience while waiting for ALL the data before showing anything?
Last edited by Evolve on 20 Aug 2022 11:18, edited 1 time in total.
-
- Site Admin
- Posts: 60595
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Asynchronous (non-blocking) List Columns
Let me put it this way: no.
FAQ | XY News RSS | XY Twitter
Re: Asynchronous (non-blocking) List Columns
My biggest concern here is the Length column. I know I already asked you about caching it and you said it wasn't planned. But unlike some edge cases (hash, exotic custom columns), the Length column is commonly used by many users and I hope you'll reconsider caching it some day.
-----------------------------------------------------------------------------
It's a shame that one of the most useful columns can only be used (painfully) with idle HDD. Once I put HDD under any load, the tabs with the Length column become completely unswitchable. It's not only blocking the tab while trying to reread all the Lengths, if I start clicking somewhere, I get partial rendering which feels even more broken.
-----------------------------------------------------------------------------
It's a shame that one of the most useful columns can only be used (painfully) with idle HDD. Once I put HDD under any load, the tabs with the Length column become completely unswitchable. It's not only blocking the tab while trying to reread all the Lengths, if I start clicking somewhere, I get partial rendering which feels even more broken.
-
- Site Admin
- Posts: 60595
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Cache Length Column [Asynchronous (non-blocking) List Columns]
Looks extreme. It's far faster here. Maybe you need a better shell extension for retrieving those properties.
FAQ | XY News RSS | XY Twitter
Re: Cache Length Column [Asynchronous (non-blocking) List Columns]
It's much faster here too with an idle HDD (still not smooth enough though).
But as soon as I put some work on it (copying smth) it degrades significantly.
The one that will grab them from cache instead of extracting again and again especially when HDD is occupied by some other work.
Re: Cache Length Column [Asynchronous (non-blocking) List Columns]
I've tagged a lot of items, and when I showed the tags column and the label column, it took two or three seconds to open a folder, the Label column was unnecessary for me, so I turned it off and the problem was solved...
Win10, Win11 @100% 2560x1440 22H2
Re: Cache Length Column [Asynchronous (non-blocking) List Columns]
I'm not that familiar with tags as I probably should be. I only use stars for ratings currently. So I'm a bit confused with you juggle back and forth speaking of labels and tags. Do I understand correctly that your solution for a slow column is to just hide it and never use it again?
All I know about tags related to the subject is that at least tags are stored inside tag.dat which is in XY folder which is in a RAM disk here. I'd be super happy to have those slow properties/columns like Length cached and stored inside XY folder somewhere...
PS. Forget about me and my RAM disk, I already can hear @admin telling me "no one else uses it except you..."
For the users with XY on their SSDs (which is almost everyone at this point, I believe) this would be as beneficial compare to extracting video lengths from a slow HDD every single time when the same HDD is also trying to do something else in parallel. Maybe I'm wrong, but I think most of the people still make use of their HDDs for storing such a heavy content as video.
All I know about tags related to the subject is that at least tags are stored inside tag.dat which is in XY folder which is in a RAM disk here. I'd be super happy to have those slow properties/columns like Length cached and stored inside XY folder somewhere...
PS. Forget about me and my RAM disk, I already can hear @admin telling me "no one else uses it except you..."
For the users with XY on their SSDs (which is almost everyone at this point, I believe) this would be as beneficial compare to extracting video lengths from a slow HDD every single time when the same HDD is also trying to do something else in parallel. Maybe I'm wrong, but I think most of the people still make use of their HDDs for storing such a heavy content as video.
Re: Cache Length Column [Asynchronous (non-blocking) List Columns]
No, I'm just giving feedback on my situation, loading columns may need improvement.
Win10, Win11 @100% 2560x1440 22H2
-
- Site Admin
- Posts: 60595
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Cache Length Column [Asynchronous (non-blocking) List Columns]
Sounds weird. The Label column should be faster than the Tags column. Unless the painting is slow for some reason.
FAQ | XY News RSS | XY Twitter
Re: Cache Length Column [Asynchronous (non-blocking) List Columns]
It turns out that it is incredibly easy to create a cached custom column by using tags.
All I need now is to be able to use ex16 the custom column as a source for the status bar template.
@admin May I ask you to enhance it one more time?
Code: Select all
$length_tag = tagitems("ex16", , "<cc_item>");
$modified = filetime("<cc_item>");
if ($length_tag == "" or $modified != tagitems("ex15", , "<cc_item>")){
$length = property("System.Media.Duration", <cc_item>) \ 10000000;
$hours = $length \ 3600;
$minutes = $length % 3600 \ 60;
$seconds = $length % 3600 % 60;
$length_tag = format($hours, "00") . ":" . format($minutes, "00") . ":" . format($seconds, "00");
tagitems("ex16", $length_tag, "<cc_item>");
tagitems("ex15", $modified, "<cc_item>");
}
return $length_tag;
Code: Select all
v22.50.0217 - 2021-12-05 20:16
+ SC get("LengthsSelected") enhanced. Added some more flags.
Syntax: get("LengthsSelected", [pane=a], [flags])
flags: (bit field)
1 = Show milliseconds.
2 = Return value only if the Length column is visible (i.e. if it can
be pulled from that column).
4 = Use the shell property "Length" (otherwise use XY's native and
more exact special property "audio.length").
Examples:
text <get LengthsSelected a 3>; //show msecs, pull from special property column
text <get LengthsSelected a 6>; //no msecs, pull shell property from column
-
- Site Admin
- Posts: 60595
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Cache Length Column [Asynchronous (non-blocking) List Columns]
Needs more thinking. Maybe later.
FAQ | XY News RSS | XY Twitter
Re: Cache Length Column [Asynchronous (non-blocking) List Columns]
If this is too broad, restrict it to just ex1-ex16 and one must keep them in nanoseconds.
Code: Select all
Syntax: get("LengthsSelected", [pane=a], [flags], [source=Special])
flags: (bit field)
1 = Show milliseconds.
2 = Return value only if the source column is visible (i.e. if it can
be pulled from that column).
source:
Special: use XY's native and more exact special property "audio.length"
Shell: use the shell property "Length"
Ex1-Ex16: use the extra column/tag (must be in nanoseconds)
Examples:
text <get LengthsSelected a 3>; //show msecs, pull from special property column
text <get LengthsSelected a 2 shell>; //no msecs, pull shell property from column
text <get LengthsSelected a 1 ex16>; //show msecs, pull from ex16 tag
text <get LengthsSelected a 2 ex1>; //no msecs, pull from ex1 column
Re: Cache Length Column [Asynchronous (non-blocking) List Columns]
On the other hand, if it's not broad enough, the opposite direction would be to generalize it.
Code: Select all
get("ReducedSelected", [func=count], [column=Name])
func:
count
sum
max
min
avg
Note: the current column format will be used.
Note: if multiple columns share the same name, the leftmost one will be used.
Examples:
<get ReducedSelected sum Length 'time: *'> // time: 05:10:44
<get ReducedSelected max Modified 'latest: *'> // latest: 01/05/2022
<get ReducedSelected min Size 'smallest: *'> // smallest: 3,32 GB
<get ReducedSelected avg Rating 'average: *'>// average: 4
-
- Site Admin
- Posts: 60595
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Cache Length Column [Asynchronous (non-blocking) List Columns]
Nice. When I find the time...
FAQ | XY News RSS | XY Twitter