Page 1 of 1

Folders can display thumbnails and display the number of files.

Posted: 15 Oct 2021, 21:29
by amwpsaa
Does the new version have this function?Folders can display thumbnails and display the number of files.

Re: Folders can display thumbnails and display the number of files.  Topic is solved

Posted: 15 Oct 2021, 23:31
by mjau-mjau
amwpsaa wrote:Does the new version have this function?Folders can display thumbnails and display the number of files.
Thumbnails yes. Number of files no ... I will need to think about that after this release.
Image

Re: Folders can display thumbnails and display the number of files.

Posted: 16 Oct 2021, 13:05
by amwpsaa
Use json to record, enter for the first time, or detect a change in the number of files, update the json file

Re: Folders can display thumbnails and display the number of files.

Posted: 17 Oct 2021, 02:14
by mjau-mjau
amwpsaa wrote:Use json to record, enter for the first time, or detect a change in the number of files, update the json file
I will definitely add it as an option, but it's a bit more complicated than you think if you want optimal performance. I'll explain (although you don't necessarily need to understand it).

When Files app reads a folder, it just reads the content inside the folder and that's it. Simple. If that folder has 100 subfolders and you want to get the "number of files" inside every subfolder, Files app will need to scan all files inside all subfolders ... As you can imagine, that can be a heavy process if there are 100+ subfolders to scan. What about cache (json)? That would have helped, but how do we know the cache is fresh and the "number of files" for all subfolders is correct and updated? At best, that means the cache would have to refresh every time the content of a subfolder changes, and that itself needs to be detected. So unfortunately, there is no elegant way to achieve "number of files" inside a folder if you want to maintain optimal performance and useful caching.

Having said that, the process would in most cases be quite fast (more than fast enough) unless your server is slow. We might be talking about folder processing times going from 10 ms to 100 ms. 10 X slower, but mostly unnoticeable to humans :thumbsup:

This was easier with folder preview images, because the create and cache logic is managed separately from the folder.