reduce memory used by vector is count of items falls below threshold