Giter Site home page Giter Site logo

Comments (4)

K1rakishou avatar K1rakishou commented on July 17, 2024

Honestly I have no idea because I have never had to work with MediaStore.

from fuck-storage-access-framework.

Shabinder avatar Shabinder commented on July 17, 2024

Honestly I have no idea because I have never had to work with MediaStore.

I am fed up (Your Repo' Name Literally tells the truth), just to write to external sdCard , I tried to migrate to SAF, I use File operation extensively in my App , and it has caused significant delays bcuz of such large number of operations.(Even after creating in-memory snapshots)

I am gonna revert back to java.io.File and will use dir in Internal Storage only, if user wants, he/she can copy files manually to externalSD .

I have been exploring SAF these past two days, and I can say even to achieve such simple tasks, they have been literal Hell.

Saying Final GoodByes to SAF, One cant use SAF when every minute there are 500's of File Operations going on.

Do you think SAF can be used in any way in such Apps with such extensive File Operations?

from fuck-storage-access-framework.

K1rakishou avatar K1rakishou commented on July 17, 2024

Yeah, if you need to do lots of disk IO then SAF is very slow. Some people measured the performance and it's like 25-50 times slower than Java File API. (https://www.xda-developers.com/android-q-storage-access-framework-scoped-storage/)

To mitigate this issue (at least partially) I came up with the idea of making directory snapshots so you can then work with the in-memory directory structure which is faster and the regular SAF access. But it has it's own downsides, obviously, like any modification to the underlying files still have to use SAF (file/directory creation/deletion) which is slow. The other downside is that there may happen desynchronization between the in-memory snapshot and actual on-disk directory structure if it's somehow modified by something/someone else while (like you take a snapshot but the user decides to delete something manually).

Do you think SAF can be used in any way in such Apps with such extensive File Operations?

I actually use SAF in my own project, and there are lots of different file operations. So, yes, It's slow but it works

from fuck-storage-access-framework.

Shabinder avatar Shabinder commented on July 17, 2024

I just finished migrating back to jav.io.File, at least I learned about SAF and got some experience with your lib, in order to use it in my future apps.

Thanks for the help and of course for this amazing project!
👍

from fuck-storage-access-framework.

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.