Saving data efficiently in internal memory (using Maps)

Discussion in 'Plugin Development' started by MgMaor, Mar 2, 2015.

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

    MgMaor

    Hey, a pro programmar told me to it's more efficient to save data in internal memory (RAM) when it's unnecessary to save it at the config.
    So I thought about it and didn't understand how to use it (I need to use maps, but I'm used to save it all at config).
     
  2. Offline

    NathanWolf

    The internal implementation of a ConfigurationSection is basically just a Map.

    So you can continue to use a Configuration internally to manage your data if you want, the important thing is that you don't save it to disk constantly, or you do it in an async thread.
     
  3. Offline

    1Rogue

    We really need to change the standards for "pro" then
     
  4. Offline

    Deleted user

  5. Offline

    Konato_K

    @1Rogue I guess it means "professional", which as far I know it means you get money from it (or that's what my dictionary says).


    @MgMaor Have you tried the java tutorial?
     
  6. Offline

    1Rogue

    I'm implying that if a "pro" can't tell that a MemoryConfiguration (the backing of bukkit's config system) isn't loaded into memory then maybe the standards that a "pro" is at are amusingly low.
     
    Konato_K likes this.
  7. Offline

    Totom3

    I'm also curious to know who is that pro.. because he might be thinking that the Configuration API writes and saves to the disk at each operation (which is not at all the case).. Very common mistake on these forums.
     
  8. Offline

    Deleted user

    @1Rogue He said it is more efficient not to write data to disk, which actually is a good tip.
     
  9. Offline

    MajorSkillage

    Bukkit servers do store data differently to how quite a few other servers and games do. Perhaps he meant it in a more general term and wasn't implying the advice for Bukkit.
     
  10. Offline

    1Rogue

    Sure, but the config system doesn't do that.
     
  11. Offline

    Deleted user

    Last edited by a moderator: Mar 20, 2015
Thread Status:
Not open for further replies.

Share This Page