Optimize main viewport selection