Hmm this looks familiar.
Your biggest issue is too many tiles. Just about any computer is going to have issues when you go over a couple thousand.
Your options are:
1: Reduce the size of the layout.
2: Only create a set amount of tiles when they are within a certain area, and then destroy those tiles when they aren't needed.
3: A combination of 1 & 2, smaller layouts connected to other layouts.