-
Notifications
You must be signed in to change notification settings - Fork 239
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
Option to defer file/directory scanning on load until later #1673
Comments
Thank you for the feedback! With #1599 Lite XL should stop scanning the tree if it's taking too long. It wasn't working previously because of an oversight, but should now. Let us know if that's not the case. For the next major release we'll also work on integrating #1455, which basically does most of what you're proposing. |
Nice! Are there nightly binaries somewhere I can quickly download and try #1599 ? Would be fanastic if the timeout was configurable, because maybe it needs to be longer or shorter depending on the network latency, VPN/SSH tunnel, blah blah etc.. As for #1455, I'm looking forward ^_^. The benefits outweight the costs I feel. Any ideas when we'll see the release? I have to say, Lite-XL is dope! You guys have done an awesome job, keep it up! |
In theory you can grab the binaries from CI here: https://github.com/lite-xl/lite-xl/actions/runs/7048712495; although these are debug binaries (we'll be fixing that as well to make them proper release binaries with every commit in the near future).
We have a pre-release coming out very soon (we just closed the last PR for the release this morning: https://github.com/lite-xl/lite-xl/projects/9); which should include #1599. #1455 will be a bit longer, but it'll be basically my top priority after we get the bugfix release out for our next major release.
❤️ |
If you are interested that change is already incorporated in Pragtical. Have been enjoying that great PR for a couple of months already, fixes many issues with current implementation. |
Oh! It looks very interesting, all the benefits of Lite-XL, but in a pre-configured / opinionated package? What else is different? Let me invesitgate further... Thank you! |
I've been looking into the file/directory scanning/watching in Lite-XL and I understand why things are done this way. But I've a suggestion to make, perhaps as a new config option.
When Lite-XL is launched with a specific file to load, it usually starts to scan that file's folder for all files, etc. The default limit is 2000 files. Now, if this happens to be a file on a network folder, or a slow USB drive, or some mounted folder from GDrive or Samba/NFS/etc etc etc, and if there were a lot of files/subdirs, it could take a user-noticable delay before the main UI is ready.
Regretfully, setting the max files to a small number (eg. 10) does not speed up this process because the directory listing and traversal (over the network) would have already been issued and Lite-XL will wait for the full reply before noticing that oops, there are more than 10 items in the list. This is especially true if the folder happens to have many files - for example, 1000 *.log files..
To reproduce, just have a large folder and many files in a network path and lite-xl <network-path/some-file>
I'd like to suggest that IF Treeview is hidden (via, plugin/setting/etc), then defer the file/dir scan until later. I believe dirwatch will automatically execute .. later, right? Not only that, if I hit open-file later, the file listing is re-populated anyway.
In this way, we achieve two things:
Of course, if someone loaded the network file, and then show Treeview, or hit open-file or find-file immediately after, then sure, it should have a delay until the traversal / loading of file information into memory is complete. But I feel that's fine because the user explicitly forced a directory traversal.
Now I suggest this to be an option because how would Lite-XL know that the file resides in a network path anyway? Hence, it's an option for users who have to deal with many files in a large directory structure to speed up the time to launch and start editing.
Yes, of course, one can simply tweak their workflow and not put so many files in one folder structure, or copy stuff to a local drive first etc. But I thought I should at least ask this question and put the suggestion out there. What do you think?
The text was updated successfully, but these errors were encountered: