calculate the size of each application