You don't need the upgrade script to compute all the sha1 values, but you could do it in the file storage package. It could create one in the background whenever a file is accessed.
Or you could have the file storage package check once a day and update 5-10 of them in the background.