1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Variables loading super slow

Discussion in 'Skript' started by xLosTxSouL, Sep 21, 2017.

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

    xLosTxSouL Member

    Joined:
    Sep 21, 2017
    Messages:
    4
    Likes Received:
    0
    Hey everyone!

    I'm using skript for a long time now and my Server was in offline mode for a long time (about 6 years almost), now because some players are botting my Server and I didn't find a good solution for it (None of the "AntiBot"-Plugins worked good for me) I wanted to turn my server in online mode. Now I did see that Skript is loading my existing variables (using MySQL) SUPER slow.

    Like this:
    [16:11:44] [Thread-17/INFO]: [Skript] Loaded 24902 variables so far...
    [16:11:45] [Thread-17/INFO]: [Skript] Loaded 24949 variables so far...
    [16:11:46] [Thread-17/INFO]: [Skript] Loaded 24949 variables so far...
    [16:11:47] [Thread-17/INFO]: [Skript] Loaded 25089 variables so far...
    [16:11:48] [Thread-17/INFO]: [Skript] Loaded 25089 variables so far...
    [16:11:49] [Thread-17/INFO]: [Skript] Loaded 25101 variables so far...
    [16:11:50] [Thread-17/INFO]: [Skript] Loaded 25101 variables so far...
    [16:11:51] [Thread-17/INFO]: [Skript] Loaded 25364 variables so far...

    As you can see its VERY slow... I got about 2 million variables and it would be too long to wait.

    Now does anybody know how to fix it? I already tried different Skript versions (at the moment I'm using the latest unofficial Skript from bensku), I tried to change the config of Skript and I did also change my Server versions (at the moment running on latest 1.12.2)

    I would be very happy If anybody does know a fix for it! It would be very shitty to remove all these variables :/


    Thanks!



    Edit:

    At the moment the variables are loading even more slower...
    [16:30:15] [Thread-17/INFO]: [Skript] Loaded 123243 variables so far...
    [16:30:16] [Thread-17/INFO]: [Skript] Loaded 123244 variables so far...
    [16:30:17] [Thread-17/INFO]: [Skript] Loaded 123244 variables so far...
    [16:30:18] [Thread-17/INFO]: [Skript] Loaded 123245 variables so far...
    [16:30:19] [Thread-17/INFO]: [Skript] Loaded 123245 variables so far...

    Just 1 variable/second :/


    Edit2:

    So I just removed every plugin except Skript... and it's still loading super low. I also did test it on another database but its still loading super slow.. any ideas?
     
    #1 xLosTxSouL, Sep 21, 2017
    Last edited: Sep 21, 2017
  2. White

    White Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    445
    Likes Received:
    25
    Of course it's going to be super slow with so many variables. Perhaps delete the variables that are considered useless?
     
  3. xLosTxSouL

    xLosTxSouL Member

    Joined:
    Sep 21, 2017
    Messages:
    4
    Likes Received:
    0
    It's a big server with 3 1/2 years use of skript now.

    I maintain my database every 3 months and delete old variables I dont need. But that doesn't explain why the variables loaded in normal speed (about 20 seconds) when I had my server in offline mode and now it takes like ages in online mode. But thanks for your advice!
     
  4. White

    White Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    445
    Likes Received:
    25
    Are the majority of the variables player data in list variable?
     
  5. xLosTxSouL

    xLosTxSouL Member

    Joined:
    Sep 21, 2017
    Messages:
    4
    Likes Received:
    0
    Most of my variables are numbers (double,long,...) like "Jobs.level.<playername>" with a number value.

    I don't use lists that much but when I do they aren't that long because I care when I do something with lists.
     
  6. White

    White Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    445
    Likes Received:
    25
    You should have used list variables since you started the server.. Variables with dots are not loop able and can only hold single values.
     
  7. xLosTxSouL

    xLosTxSouL Member

    Joined:
    Sep 21, 2017
    Messages:
    4
    Likes Received:
    0
    Hmm that may be true but list-entrys are saved in a extra cell in my database like a normal single entry so I don't really know if the difference is that big?

    And then there is the question again: Why did it work before in offline mode? I mean I turned my server in offline mode again to test it and it works fine (about 20 seconds to load all my variables) but when I change back to online mode its like 1 to 10 variables/sec again :/

    But yea thanks for your help anyway... I'll keep trying to figure out what the problem is. At the moment I delete some old variables like you said but I don't think thats the problem :/
     
  8. Pikachu

    Moderator Supporter Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    871
    Likes Received:
    127
    Medals:
    Seems more like a hardware problem
     
Thread Status:
Not open for further replies.
Loading...