Jump to content

[Source]L2Universe aka L2J-Infinity


Recommended Posts

int, byte = 4 byte both you stupid noob, you wont save memory if you use bytes, you only limit the values.

 

hehe i like guys like you.

 

if you use it for an average declaration where its a number value with a getter and setter yes it dont make any difference BUT if you use it where you handle it as an int array or a key or value or a data holder it really makes a difference after some time.

 

Just so you understand it lets say i optimize from that point of view the l2skill of l2jserver after i finish with it i see -5mb memory footprint and i did it with 1 single class now multiple with the number of places where it can be done.

Link to comment
Share on other sites

hehe i like guys like you.

 

if you use it for an average declaration where its a number value with a getter and setter yes it dont make any difference BUT if you use it where you handle it as an int array or a key or value or a data holder it really makes a difference after some time.

 

Just so you understand it lets say i optimize from that point of view the l2skill of l2jserver after i finish with it i see -5mb memory footprint and i did it with 1 single class now multiple with the number of places where it can be done.

 

Smart boy ;) I thought you wouldnt know that and fall in the trap we setup :)

Link to comment
Share on other sites

i see you write something long so lets put some math into play.

 

the sizes are:

byte: 1 byte

short: 2 byte

int: 4 byte

long: 8 byte

 

if we have an array which have 100 value the size of it in allocated memory as follows.

 

primitiveType[] array = new primitiveType[100];

 

so since the array takes 12 byte as a header the calc is:

 

12(header)+100(size)*primitiveType(which can be any datatype listed above).

 

so in that case the allocated memory for each looks like that:

 

byte = 112

short = 212

int = 412

long = 812

 

 

;)

Link to comment
Share on other sites

So according to your estimations, how much do you think you can reduce the average memory usage ( % ) ? Can you get it down to -50% ? How many human-work-hours do you think this will take ? And how are you going to keep updating a pack along with 2-3 other devs, when the competitors ( l2j / l2jfree ) have at least 10 developers coding ?

Link to comment
Share on other sites

So according to your estimations, how much do you think you can reduce the average memory usage ( % ) ? Can you get it down to -50% ? How many human-work-hours do you think this will take ? And how are you going to keep updating a pack along with 2-3 other devs, when the competitors ( l2j / l2jfree ) have at least 10 developers coding ?

 

-50 no but it can save up 25-30mb from memory footprint(at startup) as far as my experimenting goes with l2j so its still good.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock