flipkart-incubator / Krystal

Apache License 2.0
7 stars 14 forks source link

#PriorityQueueInMultiLeasePool Change from linear queue to priority queue in `MultiLeasePool` #270

Open RamAnvesh opened 2 months ago

RamAnvesh commented 2 months ago

Currently we do a lot of book keeping to perform round robin on the leased items. This is O(n) in the number of items. Ideally we should just use Priority queue so that the least leased item is always on top. This will be O(log n)