I've owned both but sold the p22. The Walther is a fun pistol but it has a couple weak points in the construction. One is that the screws that hold together the subframe come loose and lead to lots of failures that are really tough to diagnose. The second issue is that the trigger spring wears out rapidly. In a little over year that I owned it the Walther had to go back to the factory for service twice. Mind you they have some of the beat customer service going and didn't cost me a dime but still irritating.
The SR 22 is more accurate in my experience and more tolerant of ammo in the 4k-5k rounds I've run through it. I'd highly recommend the Ruger. Oh I also sold my beretta NEOS after ingot the Ruger. Far and away my favorite plinker.