Speedup the mac calculation on upload