My system is on a Xeon processor, 32 Gb RAM and a ssd disk.
It's not apt commands or kernel module building that are very slow, but the various salt command at the end of the update process.
To be clearer, it's when I have the "Pending changes" notification in the GUI or, when I use the cli, the various salt passages after the packages are installed.
This morning I had two packages to be installed (openmediavault and openmediavault-nut).
I edited /etc/salt/minion file and I added debug log.
I also added another option that helped when I had the same problem in the past which is
This time the update took a reasonable amount of time (under a minute).
Disabling grains is not a good idea because hostname is used e.g. when postfix is deployed. You should do a omv-salt deploy run systemd-networkd hosts. There were some changes in resolving DNS info, so every getaddr is now much faster which speeds up Salt startup process.