Just wasted hours trying to figure out why my Apple Magic keyboard 2 started lagging after the latest macOS upgrade - tried SMC and PRAM resets, multiple reboots, changing stupid spotlight system prefs which seem to have got reset after the upgrade (because mds_stores CPU use was through the roof) all to no avail!!!
Want to know what fixed it?
TURNING THE KEYBOARD OFF AND BACK ON!!!
Posting this up in case it helps some other poor soul!