Question: I picked up the 2018 15" MacBook Pro recently, and right away I'm noticing the slightest amount of input delay on the keyboard. It doesn't always happen, but it's noticeable when it does - the typing cursor sometimes visibly lags behind when I'm typing.

It seems like it's happening a lot in Chrome specifically, though it happens in other applications. I could just be using Chrome a lot more than other applications.

Sometimes I can't tell if it's even input delay or just general slowness, for example when switching windows with CMD+TAB sometimes the window change animation is slower (it looks like I can briefly see the current window go from opaque to semi-transparent).

Has anybody run into the same problem, or does anybody have any ideas on how to verify whether this is happening? I notice it very clearly when I'm using my Mac, but since it's so unpredictable I'm skeptical of how reliable my observations actually are.

Answer: 
I think I remember a problem from long ago related to the Dock. Try opening /Applications/Utilities/Terminal, then executing "killall Dock" (It comes right back). This may just be a workaround and you might have to do it whenever you experience the problem.
Just to add to this - my lag was actually the bluetooth keyboard which I use separately - the battery level was at 52% but plugging it directly in instantly resolved the keyboard lag issue.