calculate size on nextTick