Comments (3)
Yeah, I was afraid of this performance regression as well.
One way ranger does it is by having the option to toggle this behaviour:
https://github.com/ranger/ranger/blob/f1f3f1765f6e97b4e1af80da8f237bf7f1ad895f/ranger/config/rc.conf#L52
I think we can expand on this solution by having 3 options:
- No directory counting
- Lazy directory counting
only count when a preview has been cached/loaded - Full directory counting
This will traverse directories to count files
from joshuto.
Added automatically_count_files
option in 97ca1fb.
This currently disables file counting all together and should improve performance on network mounts, mtp, etc.
Future plan is to make it opportunistic. ie. if we already have that directory loaded into memory, then getting the count is trivial.
I will close this issue when that is completed.
from joshuto.
Support has been added to lazily count directory items:
The contents will only be accounted for if the directory contents has already been loaded into memory.
Some minor problems we will need to fix in the future is updating this value whenever a directory reload is executed.
commit: c7053df
from joshuto.
Related Issues (20)
- [BUG] Fatal crash when I return to joshuto from a shell HOT 4
- Use of `--change-directory` command line argument? HOT 1
- Configure ratatui-image preview background/frame color.
- [BUG] Linemode 'sizemtime' unknown. HOT 1
- [FEATURE] More linemodes and sort modes
- linux gnu build error
- Directory chooser HOT 2
- [Help wanted] Creating a custom script to use joshuto to control imv. HOT 1
- Feature request: delete colon to exit command mode HOT 1
- Feature request: implement scrollable preview area HOT 3
- [Bug] File preview(with bat) does not update after file modification with vim HOT 1
- Feature request: Add options to pre-select a file on start HOT 3
- Unable to select neovim config with NVIM_APPNAME environment variable HOT 1
- Feature Request: add more useful variables for shell/spawn commands HOT 1
- Feature request: keybinding `v` by default to mark all files / folders in current view
- Feature request: add `bat` as fallback for viewing HTML / JSON in `preview_file.sh` HOT 1
- symlink not work on macos HOT 1
- Joshuto exits with error on "open_with" action attempt without a target HOT 1
- NixOS : you have to add `file` for preview. HOT 1
- Feature Request: Toggle between joshuto and shell mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from joshuto.