Giter Site home page Giter Site logo

Database maximum size about sqlocal HOT 3 CLOSED

MirjamElad avatar MirjamElad commented on May 20, 2024
Database maximum size

from sqlocal.

Comments (3)

MirjamElad avatar MirjamElad commented on May 20, 2024

A side note to my question above.
I might be tempted to use sqlocal with the socket runtime (see here: https://github.com/socketsupply/socket/).
With the socket runtime, the app would be a native app (it uses the native webview not the browser) and hence the storage space it uses will not be subject to be reclaimed by the operating system (think in the context of a mobile browser that uses storage such as IndexedDB or OPFS).
All of that is to say, the database "managed" by sqlocal can grow and have real durability quarantees. For such scenario, knowing how large of a DB sqlocal can effectively handle becomes very important to test/know

from sqlocal.

DallasHoff avatar DallasHoff commented on May 20, 2024

SQLite can handle databases of enormous sizes (many, many terabytes), and SQLocal does nothing that would limit this. The only thing really limiting the size of the database is the limits imposed on the Origin Private File System API by the browser. These limits vary between browsers, but if your app requests persistent storage, you should be able to store a database around 50% of the size of the client device's disk size, and the browser will not delete it. MDN has a good write-up about how this works. I recommend reading it: https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria

In practice, you should not have to worry about being constrained by the limit. The limits are much higher than you should need for pretty much any use case. The only case you really need to handle is checking that the user's disk is not nearing capacity. You can use the Storage API for this.

With the socket runtime, the app would be a native app (it uses the native webview not the browser) and hence the storage space it uses will not be subject to be reclaimed by the operating system

As far as I know, this and frameworks like it (Capacitor, Tauri) share the same behaviors as the operating system's default browser (Edge on Windows, Safari on macOS/iOS, Chrome on Android). They create native apps that wrap a browser instance. So you should expect the Storage API for these apps to work the same as the default browser.

from sqlocal.

MirjamElad avatar MirjamElad commented on May 20, 2024

Thank you for the reply.

(Capacitor, Tauri) share the same behaviors as the operating system's default browser
That was my understanding but I ve been told otherwise. Not sure 100% as I did not find clear information though!

Anyone tested SQLocale on big data. 100 MB and up to 1 GB?

from sqlocal.

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.