Store Values in Hashmap or in Config?

Discussion in 'Plugin Development' started by Acer_Mortem, Apr 13, 2014.

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

    Acer_Mortem

    Which would be more efficient for my plugin:

    A. Storing the values in a hashmap, then loading/saving the values from/to a config file on enable/disable of the plugin?

    B. Storing the values regularly in a config file and grabbing them when I need to
     
  2. Offline

    Glumpz

    What are the variables / hashmaps used for?
     
  3. Acer_Mortem
    In the end, it depends how often you will be accessing the data. Accessing data from a HashMap is faster than getting it from a YAML file.
     
  4. Offline

    Acer_Mortem

  5. Offline

    Cronos79

    Constant file access can lag your server.. I would always use hash maps and if your scared about data loss from crashes or what ever put a timer and put the data in a file every so often.
     
Thread Status:
Not open for further replies.

Share This Page