#pragma dynamic
#1

Hi,

I'am using now 5000000 pragma dynamic. Is it slow a server?
Reply
#2

Not directly, but the mere fact that you need to use this directive is usually an indication that the script you are using is an unoptimized mess.
Reply
#3

BUt sometimes, you do that that you don't see and there use a lot of memory for ex somebody say if you return string it'is use a lot of memory

Код:
stock asdsad (variable[])
{
return variable;
}
And something similar.
Reply
#4

This much! try to optimize your scripting. Looks like you scripted something big thing poorly
Reply
#5

Are you returning strings up to 5 megabytes in size?

You gotta optimize your code in that case, not increase the #pragma dynamic.
Most scripts don't use it, as the default stack is big enough in most cases (like 99% of all possible cases).
Even big scripts which have over 50k lines don't need to adjust this value.

I also got some messages from heap/stack size in the beginning, but that was because I created big arrays inside functions.
Moving those big arrays to the main script (outside any function) got rid of those messages.
Reply
#6

My script is 300 k lines and without includes.
Reply
#7

Quote:
Originally Posted by Banditukas
Посмотреть сообщение
My script is 300 k lines and without includes.
I don't think you have the capacity to write that much code let alone manage a code base of that size.
Reply
#8

SHOWING OFF GONE WRON AHAHAHA
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)