High-order harmonic generation (HHG) in gases leads to short-pulse extreme ultraviolet (XUV) radiation useful in a number of applications, for example, attosecond science and nanoscale imaging. However, this process depends on many parameters and there is still no consensus on how to choose the target geometry to optimize the source efficiency. Here, we review the physics of HHG with emphasis on the macroscopic aspects of the nonlinear interaction. We analyze the influence of medium length, pressure, position of the medium and intensity of the driving laser on the HHG conversion efficiency (CE), using both numerical modelling and analytical expressions. We find that efficient high-order harmonic generation can be realized over a large range of pressures and medium lengths, if these follow a certain hyperbolic equation. The spatial and temporal properties of the generated radiation are, however, strongly dependent on the choice of pressure and medium length. Our results explain the large versatility in gas target designs for efficient HHG and provide design guidance for future high-flux XUV sources.