Ticket #182 (closed enhancement: fixed)

Opened 9 years ago

Last modified 8 years ago

Upload progress doesn't update frequently

Reported by: alamaison Owned by: alamaison
Priority: minor (e.g. uncommon, cosmetic, has workaround) Milestone: 0.30 Better dialogues
Component: droptarget Version: 0.6.2
Keywords: Cc:


For a single large file, a large amount of data has to be uploaded before the progress dilaogue displays any progress at all. We should run it in a different thread to keep it more responsive (or at least the MSDN docs for IOperationsProgress seem say that so maybe it applies to IProgressDialog too).

Change History

comment:1 Changed 9 years ago by alamaison

  • Status changed from new to accepted

comment:2 Changed 8 years ago by alamaison

In [065ff8af5f9425464da5e912e1783e44941f4aa6/swish]:

Copy to drop target asynchronously.

This prevents the windows blocking while the copy occurs. Some more changes are needed before this feature is ready:

  • Fix mutex problem when getting a file stream so that multiple streams can't be accessed simultaneously.
  • Remove code that uses the OLE site as this is incompatible with an asynchronous drop
  • Sort out progress dialogue on synchronous drops, as it is not appearing currently.

Addresses #59.
See #182.

comment:3 Changed 8 years ago by alamaison

  • Status changed from accepted to closed
  • Resolution set to fixed

In [189817f37a81481c6a8a77d030b6f94e4467d44c/swish]:

Pump UI messages on synchronous drop.

Because we are no longer doing the transfer in a different COM apartment, which would pump messages during the call, the UI blocks on the drop. That includes not showing the progress dialog.

Therefore, we pump outstanding messages every time there is an update. I don't think this it the right solution, but we can't run the progress dialog in a different thread as that breaks the windows rules.

The UI is still not wonderfully responsive because it can only update a little each time the progress is updated. We may be able to do better once we use libssh2's non-blocking API as then we can pump messages more frequently.

Closes #182.

Note: See TracTickets for help on using tickets.