GUI freeze on background copy operations

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Blight
Junior Member
Junior Member
Posts: 55
Joined: 2003-03-22, 23:04 UTC

GUI freeze on background copy operations

Post by *Blight »

Issue Description:
When copying large files (100's of MB) to a flash device, the TC GUI becomes unresponsive when the copy operation reaches 99% (at the point where the cache is written to the device).


Why it's happening:
TC calls an operation to write the cache data to the device before moving on to the next file operation and if the cache is big and the device write speed is slow, the GUI freezes until the cached data is written, which can be 20-30 seconds at times.


Solution:
Perform copy operations in a thread to prevent the GUI from blocking.


Note:
This issue affects mostly the background copy operations, but if you press F5 followed by F2 to add a file to the copy-queue while the background copy operation is writing the cache, the entire TC GUI becomes unresponsive until the cache is written.
Yaron Gur
Zoom Player . Lead Developer
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This can happen because in some cases, Windows writes the data very quickly to its write chache, and only writes it to disk when the file is closed. Since the CloseFile function is just one function which hangs for a long time, there is no way for TC to abort it.
Author of Total Commander
https://www.ghisler.com
User avatar
Blight
Junior Member
Junior Member
Posts: 55
Joined: 2003-03-22, 23:04 UTC

Post by *Blight »

I didn't say the problem is aborting it. The problem is that it freezes when you add files to the queue (with F5 followed by F2), something that wouldn't happen if the copy mechanism and the dialog GUI would be in separate threads.
Yaron Gur
Zoom Player . Lead Developer
soulweaver
Junior Member
Junior Member
Posts: 2
Joined: 2007-06-14, 11:40 UTC

Post by *soulweaver »

i experience the same behaviour as Blight, especailly when adding more files to the background transfer manager (BTM) while its around 98-99%, it will then hang until that current BTM file is being spooled so to speak and only then become responsive again

this is a major pain with windows 7, it seems to do a lot more disk caching than windows xp did.

the issue here is that the gui seems to be dependent on the caching to finish on the Background Transfer (since in a foreground transfer you are waiting anyway, its not quite as intrusive here), probably in the method used to add files to the queue.

is there some way to disassociate the GUI's working from the background transfer manager's waiting for disk cache? especially with the dual core/quad core nature of today's cpus surely there should be some threads available?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Well, it's the same problem - while the BTM hangs at CloseFile, TC cannot send the new file list to it...
Author of Total Commander
https://www.ghisler.com
Sync
Junior Member
Junior Member
Posts: 12
Joined: 2010-02-13, 10:08 UTC

Post by *Sync »

I also have that issue, Total Commander 7.5 GUI hangs at the end of the copy process. I my eyes it is a caching problem with Windows 7. I can't use Total Commander anymore, it always hangs!
sanctuary
New Member
New Member
Posts: 1
Joined: 2010-05-08, 15:25 UTC

Post by *sanctuary »

I started getting this late 2009 when I upgraded my PC and re-installed. I thought it was to do with the implementation of USB on my motherboard perhaps.

Today, I've had it and searched for a solution. F5 + F2 has always been my preferred method to copy. Pity if this can't be fixed.

Is there a work-around by passing files to an external copy application ie. using another copy manager instead of TCs BTM?
sethshawn
New Member
New Member
Posts: 1
Joined: 2011-01-22, 05:26 UTC

Post by *sethshawn »

I also upgraded my PC and it works for me.
tcomuser
New Member
New Member
Posts: 1
Joined: 2017-02-10, 23:06 UTC

Post by *tcomuser »

Hate to break it to you, but Double Commander doesn't have this really annoying problem.

You could probably take a look at the DT source code to see how they manage this problem...
Post Reply