Why does it take so long to install shim/ lvm and the like

Today I issued an update of a 12.3 installation. It strikes me that shim took more than 10 minutes to install, and now lvm is taking the same amount (still installing when I write this). Why does that take so horribly long?

At least in my experience, it can be slow because:

The “initrd” is rebuilt. That is sometimes slow, depending on what has to be put there.

“grub2-mkconfig” is run, and that runs os-prober. If it has problems probing your partitions, that can slow things. In particular, an unformatted partition can be a problem when os-prober tries to find the UUID for the non-existent file system.

I have also heard of problems with floppy drives. When you don’t have a floppy, but your BIOS tells the software that there is one, then there can be a long timeout waiting.