How to optimize grid level generation?

I would assume assigning the materials and having a ton of the collision checks due to the traces causes a lot of lag.
EDIT: Do you have an assign call for every floor material?