Counter pools generally live until the index is updated. If facet calls are diverse, this means long-lived allocations that are rarely used. Time-based flushing of the pools (if unused for x minutes, then flush the pool) would free this memory at the cost of the standard startup-penalty on next use.
Note: The penalty of allocating a PackedInts-based counter from scratch is relatively small, while it can be quite large for N-plane or N-Planez. If a default timeout is to be used, it should be very conservative.
Counter pools generally live until the index is updated. If facet calls are diverse, this means long-lived allocations that are rarely used. Time-based flushing of the pools (if unused for x minutes, then flush the pool) would free this memory at the cost of the standard startup-penalty on next use.
Note: The penalty of allocating a PackedInts-based counter from scratch is relatively small, while it can be quite large for N-plane or N-Planez. If a default timeout is to be used, it should be very conservative.