tmpfs for temporary extraction of inner archives

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
VEG
Junior Member
Junior Member
Posts: 5
Joined: 2017-04-15, 17:08 UTC

tmpfs for temporary extraction of inner archives

Post by *VEG »

I'm curious if Total Commaner uses FILE_ATTRIBUTE_TEMPORARY and FILE_FLAG_DELETE_ON_CLOSE when it extracts an internal archive for opening it using internal plugins.
For example, I have 7z archives which contain iso images. When I'm trying to open an iso image Total Commander extracts this image into a temporary directory and then enters it. But I'm curious if it always writes it to my SSD, or it uses my RAM instead, like it is described in the wiki article.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, it doesn't use these flags. It's the first time that I hear about this feature (not writing to disk/ssd). I will consider it. However, TC does close the file after extracting, to ensure that programs which open files exclusively can open them too. So setting "delete on close" isn't really an option here.
Author of Total Commander
https://www.ghisler.com
VEG
Junior Member
Junior Member
Posts: 5
Joined: 2017-04-15, 17:08 UTC

Post by *VEG »

ghisler
But it can be used for the case when Total Commander extracts a file for itself. For example, when we have a 7z archive with an iso image, and we have 7z and iso plugins installed, so we can open it in the Total Commander directly. So, when I'm entering 7z archive, and trying to enter into the iso image, Total Commander extracts this iso image to the temporary directory and enters this iso image. In this case, 700 megabytes of the SSD resource can be saved using this technique. Just because Total Commander extracts this file not for an external program, but just for itself.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Well, "just for itself" and "for plugin" are different things. Plugins work with files, not with file handles, so every plugin still opens every file itself...
VEG
Junior Member
Junior Member
Posts: 5
Joined: 2017-04-15, 17:08 UTC

Post by *VEG »

Oh, I understand. Well, maybe in this case it is better just to move the TEMP directory to a RAM disk.
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3854
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

... move the TEMP directory to a RAM disk
Looks reasonable at the first glance ... but you may run into troubles if an installation of a programs needs a reboot because some files are currently in use.
The new files are usually put into the temp folder meanwhile and will be exchanged after reboot.
Files located at a ramdisk are gone at this time ...
#5767 Personal license
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3854
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

The only usable solution I'm aware of is to create junctions directly to ramdisk for folders typically used by TC such as

_tc
$mltwcx
#5767 Personal license
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

sqa_wizard wrote:... folders typically used by TC such as

_tc
$mltwcx
I'm pretty sure that $mltwcx is a MultiArc specific variable/dir, and not used by TC itself.
TC plugins: PCREsearch and RegXtract
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3854
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

I'm pretty sure that $mltwcx is a MultiArc specific variable/dir ...
Actually you are right, but it is used at least by a TC plugin.
This may already be in use or will be used in the future.
Due to the fact that it will often do a lot of write access by unpacking files it is helpful ... just to be prepared :wink:
#5767 Personal license
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

sqa_wizard wrote:The only usable solution I'm aware of is to create junctions directly to ramdisk for folders typically used by TC such as

_tc
$mltwcx
In case of multiple inner archives with the same name opened the same time they are unpacked to different temp folders with _tc<number> names, like _tc, _tc0, _tc1 etc. I don't know whether there is a limitation on the number of these folders.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply