How to optimize objects loading
#5

Quote:
Originally Posted by serqq
Посмотреть сообщение
Your server freezes because SA:MP server runs on single thread - that means it cannot run multiple blocks of code alongside each other and they are waiting "in line" to be executed. Most of the time it is not a problem as it doesn't run much demanding tasks, but parsing a big XML file can be indeed demanding.

You can try this plugin https://sampforum.blast.hk/showthread.php?tid=653097 to make the whole function run in other thread alongside your server so it will be possible for server to process player commands etc. I've never used it myself, so I don't really know if it works.

How many objects are you trying to load? Just asking from pure curiosity.
There are on average around 4000 objects, sometimes more sometimes less

EDIT: i've tried loading 30000 objects myself once I was doing some other project, and they loaded literally in a second.. so idk whats problem here
Reply


Messages In This Thread
How to optimize objects loading - by NoteND - 30.12.2018, 17:12
Re: How to optimize objects loading - by serqq - 30.12.2018, 17:37
Re: How to optimize objects loading - by BlackyX - 30.12.2018, 17:41
Re: How to optimize objects loading - by NoteND - 30.12.2018, 17:44
Re: How to optimize objects loading - by NoteND - 30.12.2018, 17:50
Re: How to optimize objects loading - by serqq - 30.12.2018, 18:02
Re: How to optimize objects loading - by NoteND - 30.12.2018, 18:06
Re: How to optimize objects loading - by NaS - 30.12.2018, 18:50
Re: How to optimize objects loading - by NoteND - 30.12.2018, 19:12
Re: How to optimize objects loading - by NoteND - 01.01.2019, 11:46

Forum Jump:


Users browsing this thread: 2 Guest(s)