Another thing you may want to do is build all of you continents seperately, so you are only generally working with maps 1/4 to 1/8 of your desired world size. When you have finished all of your continents, make your 40000x20000 blank canvas, and add your continents to it. This way you only have to deal with slow down for the final stages of your map as opposed to getting decreased performance the longer you work on it.