Unity Lag Spikes… Help…

Hi, I am building a pathfinding script and functionality and I have a unit that follows a path to a target and it keeps lagging and has huge lag spikes where it takes 50-90 milliseconds to execute one thing, and I looked in the profiler and it says its from ‘Gfx.WaitForPresent’… anyone know what this mean or how to fix it?