I have Kodi 17.4 (and MythTV-Light) running on Raspbian Stretch on both Raspberry Pi2 and Raspberry Pi3.
I had very slow responce on the menus on both systems, until I disabled the hdmi_CEC setting in the config.,txt
Now Kodi runs perfectly, no lag at all even on the pi2.
Add hdmi_ignore_cec=1 to /boot/config.txt
If you dont want to totally disable the CEC functions, then you can startup with certain functions on/off as well.