Hmm, thanks haha
P.S - Nice title
|
Open Player class
Note:
What does static do?
It makes a variable shared between objects
since so it doesnt create an extra 50000k varialbles per Player object but only holds one
Knowing that PI's having 150 players online average have about 4k player objects(cause of mem leaks, no shit, i tested myself using JVM and heapspace dump) after 10h online time , i think it is a good idea to consider changing some things to static lul
add static
in
so that it becomesCode:public final int[][] MAGIC_SPELLS = {
do the same with:Code:public static final int[][] MAGIC_SPELLS = {
final int[] OTHER_RANGE_WEAPONS
final int[] NO_ARROW_DROP
int[] autocastIds
int[] PRAYER_DRAIN_RATE
String[] PRAYER_NAME
etc
can do this also with the variables
public int playerHat = 0;
public int playerCape = 1;
public int playerAmulet = 2;
public int playerWeapon = 3;
public int playerChest = 4;
public int playerShield = 5;
public int playerLegs = 7;
public int playerHands = 9;
public int playerFeet = 10;
public int playerRing = 12;
public int playerArrows = 13;
etc
that wont get rid of your mem leak but that will slow it down about 5 times lul
since the MAGIC SPELLS is like a int[100][2000] and having String arrays per player object is also a VERI bad idea
Hmm, thanks haha
P.S - Nice title
You have no Idea what your talking about. The Issue everyone is experiencing with this so called memory leak is with npcs that are removed properly, Syncing issues causing a thread deadlock causing the server to use large amounts of memory instantly then crash with no errors. Its quite simple to find the issue with proper debugging.
was sanity that stupid when he made this or he deliberately left it for us to fix this..?
maybe meh just stupid
Stupidity to the next level.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |