The development of the new free-electron lasers (FELs) opened innovative ways for the investigation of the ultrafast dynamics of the structural, electronic and magnetic properties of materials . In particular, the use of the pump-and-probe technique in X-ray photoelectron spectroscopy (PES) experiments at FELs proved to be one of the most promising methods of study in this new field [2,3]. The simultaneous emission of a huge number of electrons as a consequence of the ultrashort (< 1 ps) but extremely intense X-ray probe pulse and the strong Coulombic interactions among them constitute the greatest limitation to the implementation of this technique . This space-charge effect determines the energy shift and broadening (i.e. loss of resolution) of the core-level peaks and valence-band structures in the photoemission spectra. Also the optical pump laser can significantly contribute to the generation of photoelectrons through non-linear effects . It is important to note that secondary electrons represent by far the largest part of the emitted electrons and they are the main responsible of this detrimental effect on the higher-energy photoelectrons [6-7]. The number of photoelectrons per incoming photon, i.e. the quantum efficiency η, is the key parameter in determining the space-charge effects and in predicting the reduction of photon flux necessary to obtain the requested resolution in the spectra. The many-body Barnes-Hut algorithm  was implemented to calculate the mutual interactions in the photoelectron cloud and to simulate the energy shift and broadening of core-level peaks in photoelectron spectra from simple metals and semiconductors. Moreover, we will present preliminary experimental results of space-charge effects obtained in pump-and-probe PES measurements on a GaAs crystal using a microfocused FEL beam. Strategies to limit the production of secondary electrons and the space-charge effects will be discussed.
 P. Rebernik Ribic and G. Margaritondo, J. Phys. D: Appl. Phys. 45 (2012) 213001.
 M. Dell’Angela et al. Science 339 (2013) 1302.
 S. Hellmann et al., Phys. Rev. Lett. 105 (2010) 187401
 A. Pietzsch et al., New J. Phys. 10 (2008) 033004.
 L.-P. Oloff, New J. Phys. 16 (2014) 123045.
 X. J. Zhou et al., J. Electron Spectrosc. 142 (2005) 27.
 A. Verna, G. Greco, V. Lollobrigida, F. Offi and G. Stefani, J. Electron Spectrosc. 209 (2016) 14.
 J. Barnes and P. Hut, Nature 324 (1986) 446.