I am creating a simple file manager for a CMS. I included a function that calculates the total size of a folder, but I noticed that it increases load times considerably.