Code Monkey home page Code Monkey logo

Comments (6)

RichardLuo0 avatar RichardLuo0 commented on June 30, 2024

It seems the files app just reloads the folder again when I go back to the last folder.
For efficiency, maybe add a LRU cache for visited folders?

from files.

yaira2 avatar yaira2 commented on June 30, 2024

Thank you for the report, the underlying issue is being tracked in this issue #14119. I looked into this once and it had something to do with virtualization but further debugging is needed.

If you prefer to disable this behavior in the meantime, you can turn off the auto scroll setting from the Files & Folders page.
image

from files.

RichardLuo0 avatar RichardLuo0 commented on June 30, 2024

Can you explain how virtualization has anything to do with it?
I am sorry but to me, it looks like a purely UI bug:

  1. The last opened folder is not cached. The icons and thumbnails will reload again when I click the back button
  2. The last scroll offset is not stored. It looks like it finds the location of the previous folder and simply scrolls to that folder. I am expecting it will scroll to the same offset when I leave the folder (so the previous folder is not necessarily at the first position).

from files.

yaira2 avatar yaira2 commented on June 30, 2024

Can you explain how virtualization has anything to do with it?

I'm not sure exactly and why it's only some of the time, but my understanding is that it can't locate the correct position of the item to scroll to.

from files.

yaira2 avatar yaira2 commented on June 30, 2024

The last scroll offset is not stored. It looks like it finds the location of the previous folder and simply scrolls to that folder. I am expecting it will scroll to the same offset when I leave the folder (so the previous folder is not necessarily at the first position).

This is unpredictable as the folder contents can update.

from files.

RichardLuo0 avatar RichardLuo0 commented on June 30, 2024

The last scroll offset is not stored. It looks like it finds the location of the previous folder and simply scrolls to that folder. I am expecting it will scroll to the same offset when I leave the folder (so the previous folder is not necessarily at the first position).

This is unpredictable as the folder contents can update.

Yeah, but most of the time it just stays the same, you can restore the scroll offset and content from the cache, and when you find anything different from the actual file system, update the folder list asynchronously. This can help the app be more responsive.

from files.

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.