How to... YAML File Storage [Questions]

Discussion in 'Plugin Development' started by Pizza371, Aug 3, 2013.

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

    Pizza371

    Hey guys! x)
    I wus wondering... would making a YAML file for each individual user be safe to use?
    I mean, after a few months when a lot of people have files, will it start to lag when getting values?
    What I want is a YAML file with each user, and 2 integers for each user.
    Now that's over with.. what would be best? Would using something like MySQL be better?
    yes, integer is player kills and deaths.
    Any info / help on creating files would be helpful.. thanks.
    ~Pizza
     
  2. Offline

    xTrollxDudex

    Pizza371
    Performace would slow down considerably with a lot of YAML files, depending on RAM and server spes, I would use MySQL for like 100 players or something, and the read rate would probably be faster too.
     
    Pizza371 likes this.
  3. Offline

    willeb96

    Essentials uses one yml for each user, you'll be fine if you load/unload the files correctly.
     
    JoshArgent likes this.
  4. Offline

    JoshArgent

    Performance will not be effected by simply having a lot of files. Just make sure you only load the ones you need when you need them and then unload them once you're done. If you're storing large amounts of data for each player it's actually better to use multiple YAML files than just one data file. MySQL is another good and popular option but it won't make too much difference in terms of performance.
     
Thread Status:
Not open for further replies.

Share This Page