Background Transfer Manager is doing it's work on GUI thread

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
tomas1
Junior Member
Junior Member
Posts: 2
Joined: 2018-03-13, 06:20 UTC

Background Transfer Manager is doing it's work on GUI thread

Post by *tomas1 »

Background Transfer Manager is doing it's work on GUI thread. This leads to following issues (to replicate, use a slow connection, set it to copy several files ob background F5-F2 and then following):

- adding new files to be copied on background takes enormous time
- resizing the tranfer manager window is almost impossible (it's not responding)
- moving the window to the foreground (so I can check how much is left) is impossible (window not responding => windows put it back under other windows where it was previously.


In all above cases, the app hangs up till currently copied chunk is done, then it responds, proceses what it should do, and start copying next file chunk.
All above could by fixed by simply doing the work on a background thread, not on GUI one.
I'm copying a lot of files (from different folders) to the remote destination frequently, and waiting for the window to respond, so I can add another files from different folder is so time consuming...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48028
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Actually the background transfer manager dialog is created in the background thread which does the background copying. This is a separate thread from the main TC window. This is intentional.
Author of Total Commander
https://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Christian,
the background transfer manager dialog is created in the background thread which does the background copying.
I think tomas1 is actually suggesting to separate the BTM UI thread from the BTM copy thread.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
tomas1
Junior Member
Junior Member
Posts: 2
Joined: 2018-03-13, 06:20 UTC

Post by *tomas1 »

Yes exactly, Christian.

There is main GUI thread for the main window. That launches "background" thread to show Background Transfer Manager window. So this second "background" thread is actually GUI thread of another window, and that's causing the issues described above. All the work should be launched on non-GUI thread.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48028
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This would mean two threads per background operation, which would waste quite a bit of resources...
Author of Total Commander
https://www.ghisler.com
tomas2
New Member
New Member
Posts: 1
Joined: 2018-06-12, 04:09 UTC

Post by *tomas2 »

I understand why you think so. However, isn't the most precious resource user's time? You are trading here 1 thread (when nowadays even laptops has 6 cores and hyperthreading) which would have nothing much to do (redrawing GUI) for 15 minutes a day (in 15-60 secs chunks) of user waiting for this unresponsive program to respond again, because the work is done on GUI thread.

Not possible to login to the previous account even after password reset, the login window just pop ups again without any message of what's wrong, so created another one.
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

Currently:
- main thread handles its own GUI operations,
- background thread handles its own GUI operations + copying.


This could be as follows:
- all GUI operations could be performed by the main thread (including background transfer manager GUI operations),
- background thread could be used for pure copying only.


Result:
- same number of threads as it is now,
- background transfer manager window would be more responsive.


Of course not now, but maybe in some next TC release.

Regards
Post Reply