Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

Scripts are lagging on server

All technical topics that have been answered in one way or another can be found here.
Forum rules
By using the forum you agree to the following rules.
Post Reply
User avatar
Shock
Superfighter
Superfighter
Posts: 197
Joined: Sun Mar 20, 2016 7:17 am
Title: Metallioneer
SFD Account: Shock
SFD Alias: (#MH):Shock
Started SFD: Pre-Alpha 1.2.0.
Location: Metalion
Gender:
Age: 19
Contact:

Scripts are lagging on server

Post by Shock » Wed Dec 05, 2018 6:29 pm

I've found that scripts are lagging on server probably because of SFDE program, maybe it loads thumbnail / description and other lags for the server while hosting.
Instead of using SFDE i've got some TXT scripts that aren't working since release version, what can i do?
even loads same like the server while enabling script.

Image
1 x
-Minigame-maker.
Image
melodic hardcore the best.

User avatar
Motto73
Superfighter
Superfighter
Posts: 300
Joined: Mon May 09, 2016 7:35 am
Title: Superfighter Royale
SFD Account: Motto73
SFD Alias: Motto73, Pack-Man!
Started SFD: Multiplayer Test Demo
Location: Sunny City
Gender:
Age: 19

Post by Motto73 » Wed Dec 05, 2018 6:35 pm

I've noticed similar delay on multiple servers having scripts enabled. Even small scripts create a noticeable lag similar to ping delay while ping stays the same all the time. It might have something to do with loading the entire script file or then it might be caused by some other change. Extension scripts really add a lot more life to SFD but if they lag this much I don't know if anyone wants to use them. The lag goes away after something like 20-30 seconds mostly but the first seconds are often really important.
1 x
Image

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1390
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 28

Post by Gurt » Sun Dec 16, 2018 12:21 pm

From a technical standpoint loading the scripts is a one-time operation during the loading of a map, just after it's done loading and before the round starts while still showing the loading screen. The game will look for all enabled scripts and read them. How and where the scripts are stored doesn't matter because they are processed exactly the same - an input string read from a source file will be compiled and processed. Once that's done no more access to the files are performed. The compiled script is all the game cares about - this works the same as before.

If you have identified a script causing your server to slow down you should disable that script. It might be that the script has an un-optimized loop somewhere that can cause noticeable slowdowns on certain CPUs.
If you have scripts that doesn't work at all you must ask the authors to fix them.
1 x
Gurt

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests