1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Other [OUTDATED] Don't use YAML.

Discussion in 'Tutorials' started by Rezz, May 30, 2017.

Thread Status:
Not open for further replies.
  1. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    A large cvs file might take a while to load on server start but then everything is saved in memory and you can access your variables instantly. Saving is also quite straight forward as all new values get just appended at the end of the file (no parsing required). For YAML you have to parse the whole file for every single value and the same again if you want to save it. If you want to get a decent performance you have to store the YAML values in variables anyway to keep them in memory. But then the variables will be saved in the .csv file as well! So every time you change something it you will have to update the YAML file and the database!

    There is really no performance gain in YAML only a lot of losses. Using it for a config file is fine and should not put too much stress on the server. Using it as a custom database is just useless as you make everything slower no matter what you do.

    Regarding the problem with options. You could use global variables instead and not save them in the database.
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    This is a better explanation then the original post :emoji_thumbsup:
     
    bi0 likes this.
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    Thanks for informating.
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
  6. KroterPvP

    KroterPvP Active Member

    Joined:
    Apr 10, 2017
    Messages:
    178
    Likes Received:
    7
  7. Syst3ms

    Addon Developer

    Joined:
    Jan 24, 2017
    Messages:
    191
    Likes Received:
    22
  8. KroterPvP

    KroterPvP Active Member

    Joined:
    Apr 10, 2017
    Messages:
    178
    Likes Received:
    7
    So finally someone figured out how to handle yaml with skript correctly? Will this be the best way to do it, like Bukkit yaml method?
     
  9. Snow-Pyon

    Snow-Pyon Well-Known Member

    Joined:
    Jan 25, 2017
    Messages:
    1,235
    Likes Received:
    176
    Medals:
    WARNING
    If you found this on google, this thread was from an era were addons such as skript-yaml didn't exist, there's almost no difference with variables and you can probably find cases where using yaml becomes marginally faster, as long as you handle it properly.
     
    Uzumaki likes this.
Thread Status:
Not open for further replies.

Share This Page

Loading...