[FINAL] Optimized ProcessOptimalSize.

Also removed roundToInteger since granularity handles that use case in a more generic manner.