Speed up file size calculation