It seems as if CodeMirror is always completely loaded when WikiEditor is enabled.
This seems suboptimal. Even when CodeMirror is disabled, all it's resources are still download and in memory. That is excessive. Instead:
1: Turn ext.CodeMirror into a 'loader script' with minimal dependencies
2: Create a new submodule like "ext.CodeMirror.dependencies"
3: Move as many dependencies of ext.CodeMirror into this new module.
4: Conditionally load those modules from the enableCodeMirror function
4: IF the logged in user has the preference option enabled, use addModules to preload/predeliver the modules in question
It also seems as if this module is depending on ooui-widgets for no particular reason (wiki editor provides the ooui icon intergration, so there is no need for this module to depend on ooui)....