In this brief review we discuss the transient processes in solids under irradiation with femtosecond X-ray free-electron-laser (FEL) pulses and swift-heavy ions (SHI). Both kinds of irradiation produce highly excited electrons in a target on extremely short timescales. Transfer of the excess electronic energy into the lattice may lead to observable target modifications such as phase transitions and damage formation. Transient kinetics of material excitation and relaxation under FEL or SHI irradiation are comparatively discussed. The same origin for the electronic and atomic relaxation in both cases is demonstrated. Differences in these kinetics introduced by the geometrical effects ({mu}m-size of a laser spot vs nm-size of an ion track) and initial irradiation (photoabsorption vs an ion impact) are analyzed. The basic mechanisms of electron transport and electron-lattice coupling are addressed. Appropriate models and their limitations are presented. Possibilities of thermal and nonthermal melting of materials under FEL and SHI irradiation are discussed.