Resource management question

Discussion in 'Plugin Development' started by Appljuze, Sep 15, 2013.

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

    Appljuze

    Hello, I was wondering if it would be more "resource friendly" to create individual player.yml files for each player or to write all of the players' data in 1 config file and access it through the .get method.

    I should note that the players will have 15+ fields to each one, such as rank, kills, etc.

    Thanks in advance for any help!
     
  2. Offline

    Tirelessly

    EDIT: I'm losing my mind
     
  3. Offline

    Appljuze

    Tirelessly

    I think you completely misread what my question was...

    I asked if it would be more resource efficient to create individual player.yml files or have one big .yml file and access the info through there. Thank you for replying though :p
     
  4. Offline

    Double0negative

    Appljuze

    Would be easier to have a single file per user
     
  5. Offline

    Tirelessly

    Hah, I had two tabs open and responded half to someone else and half to you (using the first part about someone else). My bad.
     
  6. Offline

    Appljuze

    Double0negative
    Personally it would seem easier to just have one configFile object, and .get() and .set() to it. But would there be any performance increase over doing one or the other?

    No problem :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  7. Offline

    Jnorr44

    The performance difference between the two options would be so small that it really isn't a big deal. Especially if you are doing this onEnable or onDisable, in which case it may simply take ms longer , and no in-game effects would be seen (obviously).

    EDIT: Therefore, choose whichever option is easier. I particularly like the idea of separate files, that way the op can see the data you are putting in there, and knows what that player is up to.
     
  8. Offline

    repsor

    I would use different files for each player. I agree witj Jnorr44 that the performance difference is small, but using seperate files gives you a much better overview (wich I think is important in a database) and it would be easier to manage the files manually. And if you mess up a .yml file when you have seperate files for each players you don't mess up the all the data of every player, so I also think it's safer.
     
  9. Offline

    Double0negative

    Jnorr44 repsor

    If the file has a lot of users in a single file, It could start to have a performance hit.
     
  10. Offline

    Jnorr44

    Then again, either way would have performance issues in that instance. However, it would likely take 800+ lines being read to add a second or so.
     
Thread Status:
Not open for further replies.

Share This Page