This paper describes a general framework for the optimization of very large reflectarrays for space applications. It employs the generalized Intersection Approach (IA) as optimizing algorithm, integrating a number of techniques that substantially improve the baseline algorithm by accelerating computations while preserving the accuracy of the electromagnetic analysis. In particular, a learning algorithm based on Support Vector Machines (SVMs) is used to obtain a surrogate model of the reflectarray unit cell accelerating the analysis more than three orders of magnitude. For the optimization, the gradient computation is accelerated by employing the technique of differential contributions on the radiated field, which avoids the use of the Fast Fourier Transform (FFT) in the computation of the far field. Finally, to improve the cross-polarization performance, instead of optimizing the crosspolar pattern, the crosspolar discrimination or crosspolar isolation are optimized, improving both the antenna and algorithm performance. Relevant numerical examples are provided to show the capabilities of the proposed framework for a Direct Broadcast Satellite (DBS) mission, showing how to design a contoured beam reflectarray with a European footprint with two different coverage zones. In addition, a complete study of computing time is carried out to analyse the impact of each technique in the optimization process.