Solved memory exhaustion problem on large inventories