Main thread in editor gets really slow, but not on phone

I’m developing a mobile game, and I’ve never had this problem before.

As you can see in the image below, the main thread has a huge delay after firing the game for a few seconds.

When I run this on my smartphone, I have no issues dealing with FPS, it runs as smooth as a knife trough butter.

Too bad I can’t use the profiler in the free version of unity, so anyone an idea what could cause this?

PC: 8GB RAM, i7, 2GB gforce 780
Phone: Acer S1, 1GB ram, Quad-core 1.5GHz

Apparently this is caused by the console doing too much work.

For me this line of code was the issue:

animator.SetFloat("Speed", agent.speed);

But the animator didn’t have a parameter named speed, so the console constantly printed this out as a warning, which took more process time whenever an extra zombie spawned.

I didn’t know the console outprints could decrease your performance this bad!