Ticket #1742 (closed patch: fixed)
Skip compact_pool if all blocks are almost full
|Reported by:||nwellnhof||Owned by:|
If all blocks except the top block are almost full, compacting isn't needed. The attached patch makes compact_pool return early in this case.
Also, pad_pool_size currently includes pools that are almost full. This means that more memory is allocated than needed. It isn't a big problem because most of the time the memory will be used sooner or later, but it's cleaner to account for the almost full blocks here.
Plus a micro optimization in is_block_almost_full.