Make attribute table pre-allocation more accurate