Optimizing territory rendering performance