generating Chunk Lag

hi

I have made a multiplayer sandbox game with randomly generating terrain and when someone starts a game it generates the terrain and they auto join the game everythings fine but when some one else joins they get tremendous lag while generating the terrain with the varibles of the server this is my script:

using UnityEngine;
using System.Collections;
using UnityEngine.Networking;

public class GenerateTerrain : NetworkBehaviour
{
    public Material m_material;
    GameObject m_mesh;

    VoxelChunk[,,] m_voxelChunk;

    [SyncVar]int m_surfaceSeed, m_caveSeed;
    [SyncVar]public int m_chunksX = 6, m_chunksY = 6, m_chunksZ = 6;
    [SyncVar]public int m_voxelWidth = 32, m_voxelHeight = 32, m_voxelLength = 32;
    [SyncVar]public int m_chunksAbove0 = 3;
    [SyncVar]public float m_surfaceLevel = 0.0f;

    void Start ()
    {
       
            m_surfaceSeed = Random.Range (1, 75);
            m_caveSeed = Random.Range (1, 6);




        //Make 2 perlin noise objects, one is used for the surface and the other for the caves
        PerlinNoise m_surfacePerlin = new PerlinNoise(m_surfaceSeed);
        PerlinNoise  m_cavePerlin = new PerlinNoise(m_caveSeed);

        //Set some varibles for the marching cubes plugin
        MarchingCubes.SetTarget(0.0f);
        MarchingCubes.SetWindingOrder(2, 1, 0);
        MarchingCubes.SetModeToCubes();

        //create a array to hold the voxel chunks
        m_voxelChunk  = new VoxelChunk[m_chunksX,m_chunksY,m_chunksZ];

        //The offset is used to centre the terrain on the x and z axis. For the Y axis
        //you can have a certain amount of chunks above the y=0 and the rest will be below
        Vector3 offset = new Vector3(m_chunksX*m_voxelWidth*-0.5f, -(m_chunksY-m_chunksAbove0)*m_voxelHeight, m_chunksZ*m_voxelLength*-0.5f);

        for(int x = 0; x < m_chunksX; x++)
        {
            for(int y = 0; y < m_chunksY; y++)
            {
                for(int z = 0; z < m_chunksZ; z++)
                {
                    //The position of the voxel chunk
                    Vector3 pos = new Vector3(x*m_voxelWidth, y*m_voxelHeight, z*m_voxelLength);
                    //Create the voxel object
                    m_voxelChunk[x,y,z] = new VoxelChunk(pos+offset, m_voxelWidth, m_voxelHeight, m_voxelLength, m_surfaceLevel);
                    //Create the voxel data
                    m_voxelChunk[x,y,z].CreateVoxels(m_surfacePerlin, m_cavePerlin);
                    //Smooth the voxels, is optional but I think it looks nicer
                    m_voxelChunk[x,y,z].SmoothVoxels();
                    //Create the normals. This will create smoothed normal.
                    //This is optional and if not called the unsmoothed mesh normals will be used
                    m_voxelChunk[x,y,z].CalculateNormals();
                    //Creates the mesh form voxel data using the marching cubes plugin and creates the mesh collider
                    m_voxelChunk[x,y,z].CreateMesh(m_material);
                    print ("Generating Chunks...");
                }
            }
        }

    }   

}

my question is how do I make it so they don’t have to regenerate the terrain but the terrain made by the server is already there like an object that has a network component thank you!

also when a player who is on a different machine connects via match maker both players have different terrains thus one may seem to be flying or underground and when connecting via direct connection the connecting player freezes up and crashes please help