dnf can be slow from automatically refreshing the package metadata, since it's a separate command for apt (or at least back when I used it). If the metadata downloads are the trouble, you can maybe disable some repos you don't use or tweak the metadata cache expiry period, via metadata_expire and metadata_timer_sync.