How to optimize grid level generation?

Okay, first about the maths for the splines:

Second, check for bounds before spawning

You would calculate everything before spawning it, then spawn as you move through the level.
I hope this helps a bit, feel free to ask for clarifications.

EDIT: made a mistake in the first upload of the first screenshot.