Conversation
Very embarrassingly rough work. Sync likely working for trash, restore from trash and empty trash. Trash files progress dialog working as before. Restore from trash progress dialog still does not show up.
|
@jeremypw there's some improvement towards fixing the issue. With this branch on occasion the progress bar dialogs do not show up and I get the process-not-responding busy dialog "wait or kill" especially if I perform multiple steps in the same app lifetime - meaning if I close and restart the app for each step (trash files, restore files, empty trash) it seems to work. You mentioned an "undo manager" here -> #137 (comment) which I'm not familiar with nor any other subsystems that might be slowing down/interacting when there are large number of files - I've been testing with 10,000 files of 100k each. I've disabled options such as local/remote thumbnailing, file previews etc. One other issue (existing on main branch too) I see is there is no confirmation dialog popup when you empty trash with large number of files (in my test with 10,000 files) but if I empty with just a few it shows up. |
|
@vjr Thanks for your continued work on this! I'll have a look at it tomorrow. |
The file operation callbacks (which also do the syncs) are guaranteed to be invoked by GLib after the operation completes.
|
@vjr On reflection, it would be better to wait for your existing sync PR to be merged before looking at this so we can focus on one thing and fix any conflicts then. I am also touching some of the same code in my port to Vala of delete/trash operations. I may be able to fix the progress in Vala. |
@jeremypw yep best to wait until your PR(s) are merged then i can revisit mine one at a time, see #2826 (comment) |
Nitpick to avoid showing "0 seconds" for the last remaining second.
…alog Is it not a more familiar word for the everyday user?
Because I don't know how to handle multiple plurals/singulars in the same sentence.
The `file.delete_async ()` call was throwing an exception due it to being inside the trash location. Avoid / work around the exception by counting/updating progress before the call.
…nto vishal/trash-progress
|
@jeremypw this branch should be in good shape now, at least the empty-trash part, please try it when you can, i am unable to get the progress dialog to show up for trash or restore try as i might, even though i did try preventing atomic file moves to/from trash. and i could have sworn it was working earlier although it was on a different PC and i may have a different number/size collection of files i was testing. |
|
@jeremypw thanks for merging the other sync PR which leaves this one for review whenever it's a good time. |
|
@vjr I'd like to hold on this one while the port of the rest of the C code involved in trash and delete to Vala is ongoing if that's OK as they touch the same code, at least as far as trashing/deleting goes. Restoring from trash uses CopyMoveJob I think so it may be worth keeping that part. It will probably be easier to incorporate any changes required for trash/delete directly into the Vala PR. Are you able to propose a PR for that? I am just finishing off the Vala PR - need to check that all error conditions are still handled. |
@jeremypw oh yes absolutely, take your time, i can just rework this PR or start a new one once your vala port get's merged, i didn't mean to rush :-) |
|
@vjr Just tried to pull this PR into mine and there are a lot of major conflicts so probably best to rethink once mine is done. |
Fixes #137