Posts: 413
Threads: 59
Joined: Sep 2013
I did loop for about 5 million times...Didnt went good.Well my PC crashed so I lost the data.
Posts: 1,167
Threads: 57
Joined: Jul 2010
Reputation:
0
all I know, if you do something with strings/files in big loops, server just crash.
EDIT, just by any chance someone know why does topics I have read stays bold ?
Posts: 2,041
Threads: 97
Joined: Jun 2013
I tested and it me created 21.848 accounts (being that had to be 50.000) in 7.531.641 milliseconds. I did it with dini.
Code:
pawn Код:
public OnFilterScriptInit()
{
new count = GetTickCount();
for(new i = 0; i < 50000; i++)
{
new string[30];
format(string, sizeof(string), "Accounts/Account_%i.ini", i);
dini_Create(string);
dini_IntSet(string, "Password", 6347453);
dini_Set(string, "Account", string);
dini_IntSet(string, "Level", 34464345);
}
printf("Time: %i.", GetTickCount()-count);
return 1;
}
Size: 1,34 MB (1.408.916 bytes).
Size on disc: 1,33 GB (1.431.764.992 bytes).