Search doesn't continue in background

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Mav07
Junior Member
Junior Member
Posts: 8
Joined: 2007-03-12, 18:44 UTC
Location: Germany

Search doesn't continue in background

Post by *Mav07 »

This issue occurs in search dialog (ALT+F7) (TC 7.04a)

Actual behavior: When searching files (e.g. "*.txt" in C:\) there will be found many files. If a file is found it's appended to the result-list. If the list is too long, a scrollbar appears. So far so good. When I drag the scrollbar, the search pauses. (ProcessExplorer tells me that TC doesn't read from Harddisk)

Expected behavior: search continues in background while dragging the scrollbar.

This seams to be a threading-issue.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This is normal because the search is performed in the foreground thread. Reason: Plugins and some unpackers used by the search are not guaranteed to support multi-threading.
Author of Total Commander
https://www.ghisler.com
Mav07
Junior Member
Junior Member
Posts: 8
Joined: 2007-03-12, 18:44 UTC
Location: Germany

Post by *Mav07 »

Thanks for the answer. I understand that fixing this one causes too many side-effects.
User avatar
SkipR
Junior Member
Junior Member
Posts: 71
Joined: 2008-03-27, 10:39 UTC
Location: W. Australia

search dialog (ALT+F7) - pseudo background solution

Post by *SkipR »

ghisler(Author) wrote:This is normal because the search is performed in the foreground thread. Reason: Plugins and some unpackers used by the search are not guaranteed to support multi-threading.
Does that mean if I start another process for totalcmd.exe (assuming "Allow only 1 copy of Total Commander at a time" option is not set) it could interfere with a long running search in the other totalcmd.exe process?

If the answer is no, would you consider a "background" button on find files dialog that creates another process of totalcmd.exe and passes the current state to it and leaves the search running in first process. That would allow you to keep working till while search runs in process.
Skip
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, because it's a separate process. Threads share the data, plugins etc, but processes do not. But this also means that they cannot use an existing FTP or plugin connection for searching either.
Author of Total Commander
https://www.ghisler.com
User avatar
SkipR
Junior Member
Junior Member
Posts: 71
Joined: 2008-03-27, 10:39 UTC
Location: W. Australia

Post by *SkipR »

ghisler(Author) wrote:No, because it's a separate process. Threads share the data, plugins etc, but processes do not. But this also means that they cannot use an existing FTP or plugin connection for searching either.
Thanks I'll raise my suggestion as a new topic.
Skip
Post Reply