Also state the downside

This commit is contained in:
DBotThePony 2022-06-29 22:01:54 +07:00
parent 4d7ab09e27
commit ff8e9b5207
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -124,6 +124,7 @@ interface IStorageAcceptor<T : IStorageStack> : IStorage<T> {
* two stacks match provided key.
*
* 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)
* 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).