Upload & Sell: On
There is a lot of confusion on this subject mainly because of online "diffraction limit" calculators. (Including the site mentioned above)
There is not really a "limit" where a f/stop causes resolution to suddenly fall. In practice, crossing some threshold will not all of the sudden limit resolution. It's more like a gradual graph slope as aperture narrows. The proof is in the MTF (resolution) curve graphs.
Basically, even a perfect lens aberration will impact resolution at larger apertures and diffraction as it's stopped down. Most great lenses have a sweet spot between f/4 and f/8. Around f/4 aberration is no longer the prominent cause of resolution loss and around f/8, diffraction becomes the main cause. It's safe to say that most lenses need to be stopped down 1 or 2 stops for maximum resolution.
The sensor pixel density will not affect diffraction and that is the problem with these calculators. For example, a 36MP sensor will capture whatever diffraction is already coming through the lens. It's not creating more diffraction, it's just recording diffraction more efficiently which in turn, will become more evident in our pictures.
In the case of the 17-40mm, resolution level is dependent on the focal length used. The best "center" resolution would be around f/5.6-f/8 and after that diffraction becomes the main source of resolution loss. I agree with you. f/8 seems to be a good compromise.