GithubHelp home page GithubHelp logo

Comments (3)

Moderocky avatar Moderocky commented on September 22, 2024

A user could have thousands of different list::variations::like:this, potentially multiple for every::%player%::who::joined the server.
This could create hundreds of thousands of files, all of which take up extra disk space (headers, metadata, inodes, file tables, etc.) and will slow down the system incredibly.
Not to mention there's no difference in the amount of data you're loading, except that it's having to access hundreds of different places, so it'll be significantly slower than it is currently.

from skript.

corrupteddroid avatar corrupteddroid commented on September 22, 2024

yes but no.

{player::%player%::scores} can be {player::scores::%player%} but it would be harder to clean up using "clear {player::%player%::}"
if we exclude that idea leaving {player::scores::%player%} as the format then and it may became more efficient if each storage file are loaded one by one. if one of the storage fail for example scores then {player::scores::
} will not work until its fully loaded

from skript.

Moderocky avatar Moderocky commented on September 22, 2024

yes but no.

No, I'm telling you it won't.

to avoid queueing too much variable to a file which lag the server

You are still doing exactly the same number of variable writes, you're just doing them in a dozen different places. We append entries in the CSV for run-time writes so it doesn't mean there would be any less to write.

It's more costly to store and load the same data across hundreds of separate files than in one, because we still need to store/load all of them at the same time. The only difference is we're having to make hundreds of additional requests to the filesystem.

This could be conditionally faster if a user has a very specific variable setup that we can parallelise into about ~10 containers during saving and loading, but if that isn't the case it'll just become worse than what exists currently. Even with parallel loading there is a very low limit of how many things you can do at the same time (particularly when these all have to be delegated to the operating system to arbitrate).

If you want to save time, use a more efficient variable storage system (e.g. database). Most of the issue is just the inefficiency of the editable CSV format.

from skript.

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.