If you want to use ubuntu & Retropie for emulation, which is a bad option in my opinion, you definitely want a version that is really optimized,
clort76 has a wonderful guide of how to convert Ubuntu into Devuan, I see it has better synthetic performance, should be more optimized I guess, you can try that out as well
Here is his guide to convert it.