Understanding Thumbs Performance

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Understanding Thumbs Performance

Post by *JohnFredC »

Hi All

This is a (very long, sorry) continuation of a topic I started here:
http://www.ghisler.ch/board/viewtopic.php?t=6684
... but is broader in scope, so I started a new thread.

Probably half of my TC interaction is with image files (jpgs, pngs, tiffs), so thumbnail mode is a welcome addition to the TC bag of tricks. However, I have found TC to be slower to display cached thumbnails than I initially thought and much slower than a dedicated image browser such as XNView.

My theme is to understand how thumbnails display in TC and what can be done to minimize the delays I encounter when working in thumbnail mode. The following items reference TC 6.51 on XP Pro with a Pentium 2.8c, hyperthreading enabled, 1 Gb RAM, 1 GB swap file. Image sizes range from 1Mb to 250Mb.

Here are my tentative observations so far. Please correct me if I am misunderstanding what I see happen!
  • - Folder thumbs are not cached.
    - TC prepares folder thumbs before displaying cached image thumbs (s l o w).
    - After completing the initially displayed set, TC waits to post the remaining cached thumbs to the display until after I scroll into the file list (s l o w).
    - Scrolling thumbnail view suffers from "lag", invariably overshooting my target scroll position.
    - "Show custom columns below thumbnails" such as x and y dimension from the imgsize plugin greatly slows thumbs display.
    - Custom columns below thumbnails appear to be calculated before thumbnails are displayed.
    - Many actions related to thumbs (display, show custom columns, prepare folder thumbs) may not be multithreaded, or if they are, there is confict between the threads (The hourglass appears frequently and TC freezes for a little while.).
    - Thumbnail prealloc (in ini) does not allocate over 100k.
    - Thumbnail prealloc does not work for a cache directory other than the default.
    - TC frequently refuses to display any image thumbs at all (only displays document icons). This happens sometimes in folders with cached thumbs and sometimes in folders with no cached thumbs. In these cases cm_ReloadSelThumbs does nothing.
    - Minimizing/restoring TC forces all thumbs (including non-cached folder thumbs!) to redisplay (s l o w).
    - Switching to another tab and back causes all thumbs (including non-cached folder thumbs!) to redisplay (s l o w).
    - Opening an image file (with Photoshop, for instance) from a buttonbar button forces TC to redisplay all thumbs and re-prepare all folder thumbs (s l o w).
Since there are so many things going on when a thumbnail mode folder first displays, perhaps some sort of TC "intelligent" strategy to "prioritize" thumbs display would help me.

For instance...
  • Note> If both panels are in thumbnail mode, alternate between panels for each of the following steps:

    1. Display cached thumbs for visible files/folders first.
    2. Continue displaying cached thumbs for entire folder.
    3. If the user scrolls, reset cached thumbs display to the visible upper left thumb, go to step 1.
    4. If TC cannot cache folder thumbs, then evaluate which folders can be thumbnailed fastest (based on filesize of first four images) and prepare/display those thumbs.
    5. If TC cannot cache folder thumbs, postpone creating folder thumbs for folders where image sizes exceed a certain amount.
    6. Begin display of custom columns for visible thumbs, proceed to remainder, except new and changed.
    7. Prepare and cache "new" image thumbs following same priorities as regular thumbs.
    8. Prepare and cache "changed" folder thumbs.
    9. Prepare and cache "large" folder thumbs.
    10. Store all thumbs somewhere so that switching away from the tab or from TC, then switching back does not force thumb reload.
The first effort I made to speed thumbs was to make them very small (60x60). That helped a little.

One final thing: TC should scroll in "half thumb" increments so that partial thumbs show at bottom and top. I think the "squirmy" scrolling in thumbnail mode is related to TC adjusting the thumbs positions so that only complete thumbs are displayed.

Flame me, whatever... all feedback appreciated.
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2JohnFredC
To which value have you set your "PreloadThumbnails" setting?
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

Hi Lefteous

PreloadThumbnails=2
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I'm planning to create folder thumbnails internally, by taking thumbnails from files in that subdir. What would you suggest how these thumbnails should be chosen?
- alphabetically
- alphabetically, just certain file types (e.g. only images)
- by date/time (e.g. newest files)
- other?

It could also be made user-configurable, but I need some kind of default selection.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2JohnFredC
PreloadThumbnails=2
maybe you could play a bit with this setting. 3 or even 0 will load less thumbs and should refresh faster.

2ghisler(Author)
What would you suggest how these thumbnails should be chosen?
You should use the current sort order.
Caching folder thumbnails could be difficult:
- Folder contens could have changed
- Files have been added or deleted.
- Files have been modified.
- Sort order could have been changed.

Folder thumbnails should show all kind of possible thumbnails not just images (by default).
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

Caching folder thumbnails could be difficult
This is indeed a difficult issue, but I disagree with Lefteous about defaults, I think. Here are my thoughts, based on my usage habits...

For me the purpose of folder thumbs is for visual identification only: to understand at a glance which folder contains which images. I rely on folder thumbs instead of folder names because there are so many folders that a general naming convention is difficult to devise/maintain. Also the camera image filenames ("IMG_1234.JPG", for instance) are not descriptive, so naming a folder after the primary image file it contains gets quickly out of hand.

On my systems, a folder of images will almost always only contain the images that were initially placed in it plus any images derived from the initial ones. The derived images may have been enhanced, cropped, etc, but they will always have had the same root images, so...

For my usage, a folder thumb would be accurate for identification purposes if, when it is being initially created, the thumbnailer chose the oldest images in the folder and never changed after that, unless I asked that it be rebuilt.

On the other hand, if I request TC to rebuild a folder thumb via cm_ReloadSelThumb, then that would probably mean I recognize something has changed in the folder (most likely the original images are gone or changed beyond recognition) and the thumbs no longer reflect the folder contents. In that case the newest images would be the best candidates for the folder thumbs.

To summarize my usage so far:

Initial folder thumbs: Choose from oldest files...
cm_ReloadSelThumb: Choose from newest files...

But which of the oldest/newest to choose? Explorer appears to select the first four most recent images. That is not necessarily the most representative selection, in my opinion.

My idea would be to assume that a greatly different filename means a greatly different image. So... if possible, the thumbnailer should select the oldest/newest images whose filenames differ the most from each other in some respect... first n characters, length of filename, number of vowels, or something. Maybe even filesize would be a useful determinate, or file type.

So that's my first pass at this. A stock photo agency that received or created (or displayed on the web) 1000s of new images each day would probably have different requirements, perhaps more like what Lefteous requested. Also, in the stock photo agency scenario, some sort of automatic folder thumb rebuilding schedule might be appropriate.
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
User avatar
Hacker
Moderator
Moderator
Posts: 13068
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

FYI: Browsing through TweakUI XP Tips I found this:
"If you create a file called Folder.jpg, that image will be used as the thumbnail for the folder. What's more, the image will also be used as the album art in Windows Media Player for all media files in that folder."

If it helps anyhow.

Roman
Last edited by Hacker on 2005-04-02, 13:50 UTC, edited 1 time in total.
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

Hi Hacker...

I'll try that out!

Thanx
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
Post Reply