I have already understood the problem. It's because at the start it tries to generate big map. I haven't used chunks, because got no time. That's why at the start it may take a while to load and also it uses a lot of resources to place all the tiles.