When debugging T141714, I was very surprised when I turned off MultimediaViewer in my preferences (unchecked "Enable Media Viewer" on https://commons.wikimedia.org/wiki/Special:Preferences#mw-prefsection-rendering) and continued experiencing the issue. If it's not going to take over those elements, it should not be processing them.
MediaViewer still loads when disabled, to handle links that specifically request it (#/media/...). (There is a hard off flag but it's not exposed via the prefs UI.) I do not like that MV preprocesses all images on load (I think it's unnecessary, whether it's enabled or not) but that seems like a significant effort to change and I'm not sure it's worth it unless it is causing serious problems.
The registration of processThumbs could probably be moved up the call stack a bit as a quick fix.
Well let's do the math. We serve eighteen billion page views per month (as of 2016 anyway), and any patch may be relevant for the next decade or two. By my math each one millisecond we trim from page load works out to.... approximately 100 years spent preprocessing images. Given that people tend to live less than a hundred years, and that people spend about 1/3 of their lives asleep, each one millisecond has a value of approximately two entire human lives.
Perhaps someone could provide info on how much time, on average, MV spends preprocessing images on a page load.