Content plugin value handling performance

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Content plugin value handling performance

Post by *Lefteous »

I just sorted pictures in a folder with about 2000 pictures. I used a content plugin to sort by capture date. The initial sorting took a few seconds which is okay. The computer isn't that fast. I viewed the pictures on the opposite panel, than deleted the picture. Now TC rereads the vales from the content plugin. Again waiting for the values. Impossible to work this way.

Same task in Explorer. Again loading took a few seconds. After deleting the selected pictur pe i just continue my work.

Somehow the handling of already read values isn't that great.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50918
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The problem is that TC cannot know when these values become invalid, so it has to discard them every time the directory is refreshed. I can only recommend that you do NOT sort by capture date, or first use the attributes dialog to copy the capture date to the real file date (last modified), and then sort by that.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
I just don't understand why you need to refresh when sorting. Can't you sort based on the already known data and only read the values for changed files?
User avatar
tbeu
Power Member
Power Member
Posts: 1354
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

Support: Field values should be cached as there is no reason to reread values from all files if only a file is deleted.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50918
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC isn't just sorting: You deleted a file, so TC had to re-read the directory.
Author of Total Commander
https://www.ghisler.com
User avatar
tbeu
Power Member
Power Member
Posts: 1354
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

So what about caching?
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
User avatar
MaxX
Power Member
Power Member
Posts: 1193
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

So what about caching?
IMHO, it would be better to ask plugin's author about this.
E.g., TCMediaInfo uses it's own database-cache and works much faster with this cache enabled.
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
tbeu
Power Member
Power Member
Posts: 1354
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

Yes, I know that some plugins cache there values. It still would be better though if TC does not call content plugin functions again if there actually is no need at all.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

I don't see why deleting a file should force a directory reread. Isn't this just one of the things TC gets notified about? The only proper reaction I see is just deleting this single item without touching the rest.

2tbeu
Yes - asking the plugin would be way to slow! If there is really a need for new values - there is an API for that to implement for plugin author when he does excessive caching. The point is TC has do refresh as little as possible.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50918
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately it's not always clear what gets deleted - for example, when you delete a htm file to recycle bin, a folder belonging to that file may be deleted too. Also some functions like the Explorer method don't tell you what was deleted. Also deleting files may have side effects like an updated descript.ion file.
Author of Total Commander
https://www.ghisler.com
User avatar
XPEHOPE3KA
Power Member
Power Member
Posts: 854
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

Post by *XPEHOPE3KA »

ghisler(Author) wrote:The problem is that TC cannot know when these values become invalid, so it has to discard them every time the directory is refreshed.
2ghisler(Author)
Is it possible to add some features instead of that? Like some settings to (almost always) use cache and some commands to manually force rereading values by content plugins.

E.g.: user gets into folder - wdx data is cached, user changes files there, not leaving it, - use cache (with indication of that, if you so worry), user leaves folder - drop cached data.

Or it's possible to have per- file/folder/disk/type/plugin(!) disk caches. You'll save plugin writers a lot of work then. And you are familiar with the feature implementation, as you have thumbnails caching already done.

Can we please have it planned for a future TC release? :roll:
This would also allow to speed up the search, as ws requested already here.
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..
Post Reply