If the design of your roguelike limits player vision so they only see their surroundings, then instead of generating the 512 x 512 map in one go, you can improve the performance/memory usage by generating only the blocks around the player.
This would save a lot of initial loading time and could support maps much larger than 512 x 512.