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 Don't use YAML.

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

  1. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,053
    Likes Received:
    145
    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.
     
    • Agree Agree x 2
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,053
    Likes Received:
    145
    This is a better explanation then the original post :emoji_thumbsup:
     
    • Like Like x 1
  3. ShaneBee

    Supporter + Addon Developer

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

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,053
    Likes Received:
    145
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,053
    Likes Received:
    145
  6. K

    KroterPvP Well-Known Member

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

    Addon Developer

    Joined:
    Jan 24, 2017
    Messages:
    191
    Likes Received:
    21
  8. K

    KroterPvP Well-Known 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?
     
Loading...