Also state the downside
This commit is contained in:
parent
4d7ab09e27
commit
ff8e9b5207
@ -124,6 +124,7 @@ interface IStorageAcceptor<T : IStorageStack> : IStorage<T> {
|
|||||||
* two stacks match provided key.
|
* two stacks match provided key.
|
||||||
*
|
*
|
||||||
* Technical decision of using [UUID]s for primary key for locating stacks is performance.
|
* Technical decision of using [UUID]s for primary key for locating stacks is performance.
|
||||||
|
* The only downside is doubled memory usage for storing bidirectional map (implementation specific).
|
||||||
* This allows us to avoid burden of constantly constructing keys out of stacks (e.g. [net.minecraft.world.item.ItemStack]s)
|
* This allows us to avoid burden of constantly constructing keys out of stacks (e.g. [net.minecraft.world.item.ItemStack]s)
|
||||||
* which may or may not produce performance hit; [UUID]s are lightweight, semantically not bound to anything and are
|
* which may or may not produce performance hit; [UUID]s are lightweight, semantically not bound to anything and are
|
||||||
* very good for distributed ID generation (so nothing in game has to be bound to one sequential number generator).
|
* very good for distributed ID generation (so nothing in game has to be bound to one sequential number generator).
|
||||||
|
Loading…
Reference in New Issue
Block a user