Subj.
I have large archives and reading of archive header takes lot of time (5+ seconds). I want to notify TC about reading progress or something like to prevent UI freezing.
Calling ProcessDataProc during ProcessFile(PK_SKIP) seems do nothing.
Any other way?
How show progress during ReadHeader at Packer Plugins?
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Sorry, no progress bar is supported while just reading headers, this would be very confusing for the user. I would have to handle this myself, e.g. by showing a dialog after 5 seconds or so. So far I didn't have any plugins that slow. Where can I find a slow plugin to test this?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Hm, I tried to call ProcessDataProc and I can see progress now during unpacking:
Code: Select all
OpenArchive()
// first call
for each file
{
ReadHeader()
ProcessFile(PK_SKIP){ progress( curFile*-100/filesCount ); } <-- no progress here
}
// unpack needed file
for each file until needed file
{
ReadHeader()
ProcessFile(PK_SKIP){ progress( curFile*-100/filesCount ); } <-- I can see progress here, which stops on curFile
}
CloseArchive();
For example, WinRAR displays "reading archive... %d files processed" during opening TAR.GZ files. It is for example.no progress bar is supported while just reading headers, this would be very confusing for the user.
Did few tests:
If yes, so this topic question would be resolved, because no sense to display progress after archive was readed completely.
Is it right? TC prepares or parses whole big file list (to build complete FileTree for navigation) after CloseArchive?OpenArchiveW, files 35993, timer reset
{ on first ReadHeaderEx call:
read descriptors: 0 sec
read files: 2 sec
}
next calls:
{copy file information to TC during ReadHeaderExW} * 36k times
on last call: measure time (2 sec)
CloseArchive (2 sec since OpenArchive)
// then here TC fills or builds own file list, it takes 2+ seconds too
// now FileList panel is ready, 4+ seconds from OpenArchive
If yes, so this topic question would be resolved, because no sense to display progress after archive was readed completely.
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, first TC reads the entire archive into memory, and then extracts just those files which are in the current archive subdirectory. This way the archive doesn't need to be re-read when the user changes to a different subdirectory within the archive.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com