1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Config

Discussion in 'General discussion' started by SkySeven, Aug 16, 2018.

  1. SkySeven

    SkySeven Baby Zombie

    Messages:
    145
    GitHub:
    SkySevenMC
    Hello, I have always asked myself this question : regular use(task for example) of a config can it lagg the server?
    Sorry for my bad english.
    Thank's you in advance :)
     
  2. Destroyer57

    Destroyer57 Zombie

    Messages:
    275
    Do you mean plugins or applications on a system?
     
  3. SkySeven

    SkySeven Baby Zombie

    Messages:
    145
    GitHub:
    SkySevenMC
    In a plugin
     
  4. Destroyer57

    Destroyer57 Zombie

    Messages:
    275
    Yeah a plugin can cause lag. It depends on what the plugin does to the server to the players etc
     
    SkySeven likes this.
  5. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    It's like asking if a box in a truck will slow it down
    without any information of the box's content, size, weight
    it's impossible to correctly answer your question
     
  6. SkySeven

    SkySeven Baby Zombie

    Messages:
    145
    GitHub:
    SkySevenMC
    Sorry but it's not easy to express myself in english, I'm talking about config, can it lagg the server if I use Config::get() or Config::set() several times in a task?
     
  7. Destroyer57

    Destroyer57 Zombie

    Messages:
    275
  8. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    How many times in the task? How frequently is the task being run? What data are you saving? A task being run once every 30 minutes that saves an integer to an array would likely have little affect, while a task being run several times a minute, saving several large arrays at once, could have a more noticeable effect on performance.
     
  9. SkySeven

    SkySeven Baby Zombie

    Messages:
    145
    GitHub:
    SkySevenMC
    It's an array with 4 positions minimum and it's not in a task but at PlayerMoventEvent.I say task for example.
     
  10. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    well, if you're not spamming them so hard that the function call overhead and the slow array access in php come to light, you should be fine. these functions do not do disk operations, and are therefore relatively fast.
     
    SkySeven likes this.
  11. SkySeven

    SkySeven Baby Zombie

    Messages:
    145
    GitHub:
    SkySevenMC
    Ok, thank's you.
     
  12. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    understood, but you should try to explain as much and as best as you can
    minimizing the need for me to ask questions, and minimizing your need to respond to my questions
    THUS both everyone here can work as efficiently as possible

    depends, but the idea that you need to
    i recommend you avoid if possible,
    or if you feel comfortable, share the task file/the whole thing and we will see what we can do to optimize it
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.