Some questions...
#2

Quote:
Originally Posted by DusanInfinity
Посмотреть сообщение
1. If i kill SetTimerEx, but that timer is not started, my server will crash or no?
2. What in the script wants most RAM and CPU? Ex: Commands, timers, objects, vehicles or anything else...
3. Is there a chance to crash my server if i attach objects to players and vehicles?(I attach too much objects on vehicles and players in jobs)
4. Foreach or for(new i = 0; i <= MAX_PLAYERS; i++)?
5. 5 timers with 200 lines or 1 timer with 1000 lines?? (What is better? Can i optimize script if i cut any timer in 4-5 timers?)
6. Can i optimize script if i use SCMF instead formating string?
7. Is it better if i create objects in include?(i creating objects in 10 000 lines) Will script work faster when have less lines?

Thank you!
1.It'll probably crash the server.
2.Timers eats most of your RAM and CPU if you have too many of them and use them in OnPlayerUpdate.
3.It won't crash your server depending on your CPU and RAM but if the player has a bad computer he will probably crash.
4.There is really no difference between Foreach and the traditional way, i'd prefer the traditional way.
5.1 timer with 1000 lines, using timers constantly will consume your performance, i'd recommend using one timer and attach multiple variables into it.
6.natives are always faster.
7.It'll work faster if you have a cheap provider, but there will be no difference if you use includes as it still reads what's inside of it.
Reply


Messages In This Thread
Some questions... - by DusanInfinity - 25.07.2015, 18:32
Re: Some questions... - by DarkLored - 25.07.2015, 18:49
Re: Some questions... - by DusanInfinity - 25.07.2015, 19:00
Re: Some questions... - by SickAttack - 25.07.2015, 19:04
Re: Some questions... - by DusanInfinity - 25.07.2015, 19:14
Re: Some questions... - by SickAttack - 25.07.2015, 19:23
Re: Some questions... - by DusanInfinity - 25.07.2015, 19:27
Re: Some questions... - by Vince - 25.07.2015, 19:31
Re: Some questions... - by DusanInfinity - 26.07.2015, 19:54
Re: Some questions... - by TwinkiDaBoss - 26.07.2015, 20:33

Forum Jump:


Users browsing this thread: 2 Guest(s)