- Thu Feb 23, 2012 9:04 am
#78810
Not meaning to sound harsh or anything, and even though I don't know Intelli's code or Minecraft's code that well, here's what I think of this idea (assuming my assumption is correct):
At this moment, if what Axel says is true, the server has one entity removal timer, which is global for all entity (items, that is, not people). That means one timer affects every dropped item on the server. This takes a certain amount of memory, lets call this memory 'x'. That is, the timer consumes x memory.
Now, if we were to attribute an entity removal timer to each and every item that is dropped on the server. So each item dropped consumes x memory with this timer alone.
Now, lets say that Joe Bloggs was running along with an inventory absolutely full of items (including armour), when he got snuck up on by a creeper and died. Luckily, all of his items were spared from the explosion. But of course, each item has an individual timer which consumes memory x. There are 64 items to a stack, and 36 stacks in an inventory and 4 items in armour. So you are looking at ((64*36)+4)x memory being consumed by that unfortunate death. That amounts to 2308x. To keep track of things, this is 2308 times the memory that a global timer would consume. Already, you can see that this idea will be quite memory consuming as it is.
Now, although this statistic was thought up from my head, I'm sure players will roughly agree with my estimate. At the time where the number of players playing on the server is about 60-70, within the space of 10 minutes about 2 or 3 players get killed by some monster or some tragic accident. So, if you are suggestion a 10 minute timer, you're looking at a mean of 4616x to 6924x memory being consumed (assuming every death is carrying full inventory, this is a worst case scenario in this situation). Of course, the real value to this will vary.
So, can you see that if you assign a timer to each entity, the server could be demanding nearly 7000 times more memory for the indivual timers than with a global timer. Not having a go, just letting you know the downsides to this idea.
Fun fact: if we decided to cram 100 players into the server, fill all their inventory up completely (including armour), then they all die, that's 230,800 times the memory of a global timer. That's a lot. Never gonna happen, but it's a lot.
OrigamiElephant wrote:That's like saying you hate Microsoft, so you throw your Ipod in the dishwasher.