Solved Saving object to file vs Config

Discussion in 'Plugin Development' started by kameronn, Jan 22, 2017.

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


    Which one is faster and I'm doing this:
    • Per player files, so a new file is created everytime a player joins the server.
    • These files are read into an object then cached
    However I'm not saving the actually object I'm just saving the values in the config and converting them, what I might do is save the object as a file and then read it and cache it when I need it.

    Question: Which one is faster, and is there a difference if file sizes, etc?
  2. Online

    timtower Administrator Administrator Moderator

    @kameronn To be honest: I don't think that it is noticeable.
    kameronn likes this.
  3. Offline


    @kameronn @timtower'
    It isn't.

    What you should be worries about is how you will use this data. Are you planning on having people edit these files manually? Do you want to be able to re-write or remove data without having to do reloads/ shut down the server? Do you want the data from the file to be readable? Then use separate files. If not, use a config.
    kameronn and timtower like this.
Thread Status:
Not open for further replies.

Share This Page