New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement request: refresh/recompute #96
Comments
That would certainly be nice to have! Implementing it well is something that wouldn't come easily to me as…
Instead of this vision of the perfect implementation of it maybe there is a cheaper way. What about adding a command-line flag that allows to pass the 'root' directory at which the GUI should start. A refresh request could then What do you think? |
The way I end up using this tool mostly is |
I hope you find it useful that it now prints the paths that were selected when exiting. |
Wouldn't that cause it to forget everything else? (apologies, I am late.) |
That's true, in this example it would definitely forget files selected for deletion. In another step one might be able to pass these as well. Doing so would certainly complicate things, so maybe doing the refresh internally would end up being way easier. |
I was more thinking it'd forget, like, everything (including the files and directories outside the one you're viewing that had already been scanned for their size). |
This feature, probably most wanted from 2021 |
I wonder what is the use case for this feature. I get that if you delete the files outside of |
@gosuwachu |
You might also do other operations than deleting, such as moving, renaming, etc. Also, there may be certain reasons you don't want to delete from dua but instead delete from another application (Adobe Lightroom Classic for example, where you want to keep the state of the photo catalog consistent with the disk files). |
I am thinking about implementing it and want to brainstorm few options we have: 1. execWhat @Byron has suggested earlier. Downside is that we lose the state completely, but it should be easy to implement. We could serialise the state as an improvement. 2. big-bang refreshCreate new tree for the current directory and only update it after the scan has completed. The fastest and relatively easy to implement. Downside is you will only see the updates after the scan finishes. UX should be acceptable when refreshing smaller subdirectories, but it is a degraded UX in comparison to the interactive and live scan you get when you launch 3. live refreshSame as above, but the tree is updated live (maybe after every 200ms like it is today during initial scan). I have started implementing it as it can be used to implement #82, but I am not convinced it is worth the effort anymore as 4. watch file system changesUsing something like: https://github.com/notify-rs/notify. However inotify API on linux is tricky to get right, so this is probably most difficult, but probably has the best UX. What other similar tools do?
|
Thanks a lot for the analysis! After having been reminded of the beauty of An entirely 'new' mechanism would be needed to signal that a refresh is supposed to take place, for that the event loop would have to be able to signal the holder of the send-end of the 'ccreate-or-update-entry' channel to start sending new data for a particular root node. This signal could probably be another channel. In order to get there, I'd first refactor the way the initialization is done to the new design as described above, which should be the same for the user in terms of performance and responsiveness. As second step, i'd add the 'signalling' channel to communicate which node should be updated, which will cause new nodes to stream in. Of course, the devil will hide in the details here 😅, but I think that's the cleanest solution which will stay true to the UX we have right now, which, TBH, I wouldn't want to compromise on. With the architecture above, another great feature would be enabled BTW: live-visualization of which directory it's currently traversing into. What's more obvious now that it's super-responsive during scanning is that it looks like certain folders aren't there at all even though they just aren't there yet. Hence, it would be great if these 'in-progress' folders would be displayed . From there, it would even be possible to display the amount of children it traversed thus far as some kind of 'progress' until it finally 'pops in' so the user can enter it. A side-effect of this would be there would always be multiple in-progress entries as it's multiple threads doing the work, so probably very cool to look at indeed :D. |
I like it. What makes it even better is that |
fyi, I do have a work-in-progress version of refactored app startup based on crossbeam, but I need to go through few clean-up iterations 🎉 |
Lower-case `r` will refresh the currently selected entry, while upper-case `R` will refresh the entire displayed directory, and all entries in it. Further, what was called `item` is now called `entry` across the user-interface.
This feature has been implemented with this release. |
Hello again,
here is another idea for a potentially useful feature: add the possibility to refresh the entry list and recompute the sizes and percentages. This could be bound to the key
r
.This is useful if the files are modified (added, removed, resized) outside of the application while it is running in interactive mode.
The text was updated successfully, but these errors were encountered: