[Helpful!] Some notes about 0.3
#15

It's worse than that. The code, for no apparent reason, redefines MAX_PLAYERS as 100, despite the fact that MAX_PLAYERS is currently 16. It then creates an array 2000*100*2*4 bytes big, i.e. 1600000 bytes (1562.5 kb, 1.5Mb). That's where all the extra data is coming from - and it's not needed at all:

http://forum.sa-mp.com/index.php?top...post_reduction

When 0.3 is released, assuming 2000 vehicles and 500 players, as it is that code will be 10000000 bytes (9.5Mb). Using the information in that link you could reduce it to 62500 cells or 250000 bytes - that's less than a quarter of an Mb, less than a sixth of the space taken up by the current code, and with 5 times more players than the current code:

pawn Code:
new gVehicleData[MAX_PLAYERS][Bit_Bits(MAX_VEHICLES * 2)];
Reply


Messages In This Thread
[Helpful!] Some notes about 0.3 - by Redirect Left - 02.09.2009, 10:55
Re: [Helpful!] Some notes about 0.3 for you all - by Stas92 - 02.09.2009, 11:02
Re: [Helpful!] Some notes about 0.3 for you all - by Redirect Left - 02.09.2009, 11:02
Re: [Helpful!] Some notes about 0.3 for you all - by Stas92 - 02.09.2009, 11:04
Re: [Helpful!] Some notes about 0.3 for you all - by Redirect Left - 02.09.2009, 11:37
Re: [Helpful!] Some notes about 0.3 for you all - by lavamike - 02.09.2009, 11:48
Re: [Helpful!] Some notes about 0.3 - by kc - 02.09.2009, 13:23
Re: [Helpful!] Some notes about 0.3 - by MenaceX^ - 02.09.2009, 13:35
Re: [Helpful!] Some notes about 0.3 - by Redirect Left - 02.09.2009, 13:36
Re: [Helpful!] Some notes about 0.3 - by MenaceX^ - 02.09.2009, 16:45
Re: [Helpful!] Some notes about 0.3 - by MenaceX^ - 04.09.2009, 12:20
Re: [Helpful!] Some notes about 0.3 - by ded - 04.09.2009, 12:27
Re: [Helpful!] Some notes about 0.3 - by Whiteagle - 04.09.2009, 21:52
Re: [Helpful!] Some notes about 0.3 - by kc - 04.09.2009, 22:04
Re: [Helpful!] Some notes about 0.3 - by Y_Less - 04.09.2009, 22:12
Re: [Helpful!] Some notes about 0.3 - by ded - 04.09.2009, 23:44
Re: [Helpful!] Some notes about 0.3 - by lavamike - 05.09.2009, 04:26
Re: [Helpful!] Some notes about 0.3 - by Balon - 05.09.2009, 07:29
Re: [Helpful!] Some notes about 0.3 - by Brendan_Thomson - 05.09.2009, 15:10
Re: [Helpful!] Some notes about 0.3 - by Calgon - 05.09.2009, 17:37
Re: [Helpful!] Some notes about 0.3 - by Haku - 06.09.2009, 08:07
Re: [Helpful!] Some notes about 0.3 - by Trooper[Y] - 08.09.2009, 15:30
Re: [Helpful!] Some notes about 0.3 - by Rac3r - 08.09.2009, 15:48
Re: [Helpful!] Some notes about 0.3 - by lavamike - 11.09.2009, 00:28
Re: [Helpful!] Some notes about 0.3 - by Redirect Left - 11.09.2009, 12:08
Re: [Helpful!] Some notes about 0.3 - by [OREL]Atos - 13.09.2009, 09:41
Re: [Helpful!] Some notes about 0.3 - by Sergei - 13.09.2009, 09:44
Re: [Helpful!] Some notes about 0.3 - by [OREL]Atos - 13.09.2009, 09:51
Re: [Helpful!] Some notes about 0.3 - by Sergei - 13.09.2009, 10:02
Re: [Helpful!] Some notes about 0.3 - by PyroFox - 13.09.2009, 10:12
Re: [Helpful!] Some notes about 0.3 - by Stepashka - 13.09.2009, 10:45
Re: [Helpful!] Some notes about 0.3 - by Sergei - 13.09.2009, 10:58
Re: [Helpful!] Some notes about 0.3 - by Stepashka - 13.09.2009, 11:50
Re: [Helpful!] Some notes about 0.3 - by Sergei - 13.09.2009, 12:21
Re: [Helpful!] Some notes about 0.3 - by Stepashka - 13.09.2009, 12:48
Re: [Helpful!] Some notes about 0.3 - by *James* - 20.09.2009, 14:12
Re: [Helpful!] Some notes about 0.3 - by ded - 20.09.2009, 14:21
Re: [Helpful!] Some notes about 0.3 - by AlexDontKill - 20.09.2009, 14:57
Re: [Helpful!] Some notes about 0.3 - by V1ceC1ty - 21.09.2009, 14:27
Re: [Helpful!] Some notes about 0.3 - by Gergo1352 - 21.09.2009, 14:44

Forum Jump:


Users browsing this thread: 7 Guest(s)