How to reduce lag / generation time when generating large tile maps

I am creating a game which is similar to a dungeon crawler. To do that, I started by creating a map generator. The map generator I have currently uses co-routines so I can have a loading bar, and to generate tiles it uses the Instantiate command. My problem is that at my larger map sizes (Medium - 150 x 150 tiles per floor, 5 floors, and Large, 210 X 210 tiles per floor, 7 floors) the rendering of the tiles causes drastic lag (which originally made it appear like it was frozen, now with the loading bar it does not).

For the small map it only takes about 10 seconds of generation, about 5 minutes for the medium and over an hour for the large. (Note, the large map generation is timed out by unity).

I’ve looked up ways to reduce the amount of time and all I’ve come up with are meshes. However I really don’t understand meshes and so couldn’t implement them even if I wanted to (at the moment anyway, I’m a fairly new programmer). As well, I am not sure I even want to use meshes since I would then have to spawn in a bunch of tiles every turn for each player, which the player would then select his/her choice and then I would remove the tiles only to repeat it a second later.

Basically I am looking for the best method to (significantly) reduce the generation time of my maps. If this is meshes, then obviously I’m going to have to learn more about meshes, but I am hopeful there is another, easier way, to do this. (Oh, and the actual time it takes to generate everything but the actual instantiation of the tiles is fairly reasonable, a couple seconds for the large. Most of the time is spent instantiating).

Thanks!

You are probably creating over millions of gameobjects because you are not using meshes.
If you use meshes it would only take 1 second to render maps like 750x750

This is a great tutorial on voxel meshes the way you probably want your tilemap.
It’s not super difficult, you just need to get your base layer layed down.