Improved performance of 'calculate' when there is no selection