-
Notifications
You must be signed in to change notification settings - Fork 13
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
Network mapped drive support? #168
Comments
Hey, thank you for the issue! I would personally also expect network file systems to be included in the file dialog. Could you please try entering the path to a network filesystem directly via path edit in the top panel? The file dialog is currently using the |
I assume the reason the first segment of the path is not displayed is because the file dialog currently assumes that the path prefix Are you currently building the binary in debug or release build? With 2000 elements there should be no problems in the release build 🤔 |
But even in the debug build this shouldn't cause any problems. It could be that loading the directory elements over the network simply takes too long. If the dialog becomes unresponsive, have the elements already been loaded? |
Yes, it's very sluggish in release mode. The elements do load after a few seconds. It does seem to be network-related, as I can view a similar directory on my SSD without so much lag (although there is a bit) |
If it helps any, I was hoping to migrate from egui-file (https://crates.io/crates/egui_file) It's not quite as nice looking, but it does show drive V: in the drive list, and after a second to initially load the Kryoflux directory, it scrolls through every item in there with no issues. |
Ye that doesn't sound right. I have to see if I can reproduce this. Does egui_file load the available system drives? |
Before I start reproducing - which file dialog and egui version are you on? |
yes, it shows all drives. I was attempting to use 0.6.1 with 0.28.1 of egui in my project, because I don't use eframe and I am stuck on winit 0.29 for the moment due to custom rendering code that has to be completely rewritten for 0.30's api changes. But I compiled the 'save_as' example to reproduce using a fresh clone of the repo:
rustc 1.79.0 (129f3b996 2024-06-10) |
I created a directory with 50,000 elements. The performance in the debug build is not good, but in release build you can notice that the file dialog runs a little slower, but its definitely still usable with minimal input lag. But I also tested on Linux. I'll run the same test on Windows. Also tested Edit: also works with |
Ye alright on Windows, a directory with 50,000 elements is not usable at all. Interesting 🤔 So to summarize the todos of the issue:
Is something missing? |
I can test in linux as well, at least in a VM your list looks good. I appreciate you taking the time to look at this! edit: |
Found the performance issue. It's because the directory items are filtered every frame. Interestingly, this doesn't cause any performance problems on Linux, but on Windows. I will now change it so that the file filter and show hidden files/folders are applied when loading the directory. This means that every time these filters are changed the directory needs to be reloaded. However, the performance will be significantly improved. The text-based search will still take place every frame. As far as I could test it on Windows, with 50,000 directory items this does not lead to performance issues. |
Do you mean that if you enter "V:\" as the filename in a file save dialog in Windows, the partition will be loaded instead of the file saved? This is interesting, but I don't think it fits the file dialog here. Because we have the path edit at the top, which can also be opened with |
of course, your call whether to implement that or not. it may be something windows users are in a habit of taking advantage of. |
I created an issue at I'll wait for the maintainer's response there before I implement my own version here. |
@dbalsom All todos are now fixed on develop. Are you able to test the changes? |
i'll let you know as soon as i can |
Tremendous improvement! I see my NAS mapped V:, and the loading-spinner keeps egui responsive while it chews through the file listing, and once it is loaded it is very responsive. one minor suggestion (don't shoot me) would be to cache the directory contents , if i go into a subfolder and then back out, it looks like it has to load everything again. not a huge deal though. Thanks for your hard work. Now I just need to update my winit so I can use this :) |
Awesome, thanks for testing! Caching is not quite so easy, because we do not know whether something has changed in the directory. This means that we would then have to work with modify timestamps of the directory, which depends on the platform and filesystem. But I think that's something we can think about in the future. Can this issue be closed for now? If you have any further ideas or problems, feel free to create new ones :) |
Thanks for the excellent crate! It's nice to have such a feature-filled file browser for egui.
Just one issue - apologies if I missed something in the config, but I am not seeing mapped drives on Windows 10.
I don't really expect egui-file-dialog to find network paths, but if we have mapped them to a drive letter, I would have naively assumed they'd show up when enumerating drive letters.
Most of the files I need to access via my program are on my NAS, mapped to V:
The text was updated successfully, but these errors were encountered: