:internal: performance improvement for size calculation of a formula