make rtree query do O(1) allocations only