When you shoot at f/22, you will always lose sharpness due to the diffraction effects. For some subjects, that's not an issue, for others it is. As a photographer, you have to learn the behaviour of your equipment and know when the compromise of high depth-of-field is worth losing the fine detail sharpness. Mind you, at 10mm, you have tremendous depth-of-field even without going to f/22, so you can safely go to f/11 or f/16 and get both sharp images, and very good DOF.
The diffraction effects work differently with different size sensors. If you go to the cambridge link I gave you, you can play with the calculator and see that the diffraction effects are less with the larger sensors.