I have an older computer with limited memory so I've faced this problem many times.

One thing I do is make the layers only as large as they need to be. For example a mountain range or a lake only need to be a fraction of the total image size. This saves memory and improves speed.

With more complicated maps or drawings, I often partition the drawing into sections, build each section in a separate file and then copy the resulting image into the main file (Edit > Copy Visible, then Edit > Paste as > New Layer). This can be somewhat of a pain, but it allows me to make changes later in the section's original where I still have all the layers and it doesn't burden the main file with those layers.