The editor in 2020.1.2f creates huge lag spikes when moving the mouse, even in a completely blank project created with the 2D template. Profiling the editor shows that Application.Message is causing the lag, with Application.Message.MouseMove also creating random spikes. The attached profiler screenshots are from a blank project created with the 2D project template.
It has something to do with your canvas EventSystem & Standalone Input components. If it’s anything the same as my problem, next will be trying to figure out why the application.tick ms is so high. Something to do with repainting scenes.
I was wondering why I had the same problem with my project on PC but not on my laptop.
Application.Message appeared randomly and caused lag for a few seconds.
I don’t know why, but I solved the problem by removing a Fat32 USB stick from my system.
Maybe Unity checks for new input controllers and gets in conflict with the different file format.
FWIW mine was due to a faulty USB camera, it kept connecting and disconnecting. Every time a USB device tries to connect, it appears the unity input system tries to register it.