Coder Social home page Coder Social logo

Comments (5)

modukon avatar modukon commented on July 18, 2024 1

We could provide an API for this in PersistentChunkStore

Thanks for the reply! An official API sounds great.

Some ideas:
When I made this issue I did not think about deleting the data again, maybe the PluginManager could handle this somehow?
If you delete a plugin it deletes its storage in the DB too? It gets automatically deleted at the beginning of each round like the map data? The DB could be a way for plugins to share data with eachother? (dont know if this would be used)
Using the DB seems complicated, i think it would be enough if we can just easily store a single object with a name and we can put all the data we want into this object.

from plugins.

Stx69 avatar Stx69 commented on July 18, 2024

ohhhh.... I found this about limits "Maximum storage size depends on 2 things, Browser and Disk space." 🥇 from here!!!

const quota = await navigator.storage.estimate();
const totalSpace = quota.quota;
const usedSpace = quota.usage;

from plugins.

modukon avatar modukon commented on July 18, 2024

const quota = await navigator.storage.estimate();

Ok this is also interesting, i made this small function to check the usage:

function logIndexedDBUsage() {
    navigator.storage.estimate().then(d => {
        let usage = Math.round(d.usage / d.quota * 1000)/10;
        console.log("indexedDB usage: "+usage+" %")
    })
}

it shows me 2.9%
i assume df stores the map data in the indexedDB (i have not mined a lot this round)
But this way you can see the limit of your mining? I assume when it reaches 100% you cant mine anymore

from plugins.

Stx69 avatar Stx69 commented on July 18, 2024

just small part of map here 66mb size and console say to me indexedDB usage: 3 % / browser Brave take from RAM around 3.5Gb , total ram of PC usage ~7.5%. I will ask for some BIGBROTHERS to do test... :D

from plugins.

ichub avatar ichub commented on July 18, 2024

We could provide an API for this in PersistentChunkStore

from plugins.

Related Issues (13)

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.