heribertolugo / FileList

List all files in a given directory, and provide the option to copy or move selected files.
1 stars 0 forks source link

UI Messages And Thread Count Sometimes Do Not Update #80

Open heribertolugo opened 2 years ago

heribertolugo commented 2 years ago

When there are too many threads processing, the messages and thread count on the UI do not update.

One possible remedy is to limit the amount of time which needs to pass before the UI attempts to update, or to create some kind of queue which stores the messages and then a separate process which goes through the queue and processes the messages.

This is marked as a bug because it is not working as intended. But since it is not detrimental it is marked as enhancement.

heribertolugo commented 2 years ago

The issue goes a little deeper. The UI fails to update when too many threads are trying to update the UI concurrently. There are currently 3 controls that get updated independently from each other from multiple threads. This seems to be the issue.

A better approach would be to call 1 single update to all 3 UI controls at once per thread. The FileData can be sent in batches representing all files in a given directory. A lock needs to be used to prevent loss of FileData.

A issue has been created for the batch updating of the treeview. #81