An ESA supported study was carried out for the development of an optimized code for near real time retrieval of altitude profiles of pressure, temperature (p, T) and volume mixing ratio (VMR) of five key species (O3, H2O, HNO3, CH4 and N2O) from infrared limb sounding spectra recorded by MIPAS (Michelson Interferometer for Passive Atmospheric Sounding), which will be operated on board ENVISAT-1 satellite. The implemented model is based on the Global Fit approach, i.e. all the limb-scanning spectra are simultaneously fitted, and on the analysis in narrow spectral intervals (microwindows). The trade-off between run time and accuracy of the retrieval was optimized from both the physical and mathematical point of view, with improvements in the program structure, in the radiative transfer model and in the computation of the retrieval Jacobian. The attained performances of the retrieval code are as follows: noise error on temperature less than 2 K at all the altitudes covered by the standard MIPAS scan (8 - 53 km), noise error on tangent pressure less than 3%, noise error on VMR of the target species less than 5% at most of the altitudes of scientific interest covered by the standard MIPAS scan, with a total run time of less than 6 minutes on a SUN SPARC station 20.