Git Product home page Git Product logo

Comments (3)

kamiyaa avatar kamiyaa commented on July 27, 2024 1

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:

  1. No directory counting
  2. Lazy directory counting
    only count when a preview has been cached/loaded
  3. Full directory counting
    This will traverse directories to count files

from joshuto.

kamiyaa avatar kamiyaa commented on July 27, 2024 1

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.

kamiyaa avatar kamiyaa commented on July 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.