Doubt about PVar
#1

It's true that pvar spends more memory than common var?

Sorry my bad english, i'm not from USA.
Reply
#2

https://sampwiki.blast.hk/wiki/Per-player_variable_system <- Read This

I think they use less memory, "Saves memory by not allocating pawn array elements for playerids which will probably never be used."
Reply
#3

Thanks!! +rep
Reply
#4

They do use more memory, as it has to save it to the server instead of the script, or something like that. It's not 1992, 1mb of ram isn't going to make or break anything, I don't know what people have against PVars, though I prefer to just use variables.
Reply
#5

In my experience the use of limited player variables(pvar's) isn't performance decreasing, how-ever they are not meant for practical use. They are mostly used to communicate between gamemode, filterscripts, etc.
Reply
#6

Quote:
Originally Posted by Abagail
Посмотреть сообщение
In my experience the use of limited player variables(pvar's) isn't performance decreasing, how-ever they are not meant for practical use. They are mostly used to communicate between gamemode, filterscripts, etc.
Yeah, that's all they are good for... I wouldn't use them over regular variables... But that's not what he was asking...
Reply
#7

The main cause of concern is that they are a whole lot SLOWER than regular variables. Since present day servers have more than enough memory, I'd be more than willing to trade some for improved speed. In short, don't use PVars unless you need them across scripts.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)