Someone once said to me "local optimization does not work", and I had no answer to that at the time. But today I proved the guy wrong: the new program to generate moorelife from the images and stories was working fine, but the building of the dependency map to find out which pages needed updates when new stories are added or modified was taking way too long.
So this Sunday morning I asked Grok 4 if it could tell me whether the dependency build in there could be optimized by caching it in between runs, and only processing the stories that had indeed changed. He totally agreed with me, and gave me the necessary changes to update the source file. Like any programming engineer, he did make a mistake, but together we fixed it, and the first run then took just about the same time. But the second run was awesome: the execution time easily dropped to less than five percent of what it used to be, a times twenty speedup!