Simplestreams image repository

I maintain an own simplestreams repository with numerous images, some very large.
The process of creating /repos/streams/v1/images.json works so far.
Just the process of creating hash(256)file for root.squashfs or combined hash takes very long for large images.
Is there a faster/better way to do this?

On the production servers we just call sha256sum through the shell, it’s not too bad as far as performance but that’s also because storage is fast SSD and the server has a fast CPU and plenty of RAM (can load the whole image in memory if needed).

Previously i did shell sha256sum too. And because unlike your production, I dont have a continuous image creation, but daily partial updates only.
i wrote a key/value (date=> date, hash=>md5sum) in those files attributes (setattr), to avoid doing the same in next run.
But by time moved on to php cli due to one run solution, using php hashfile function and same time continuing with php to create the json index.
Problem of latter is, it goes again through all stuff and takes a while to generate the md5s.
As you mentioned, perhaps gear up with hardware might help.
Thanks for your reply.