Loading of the Ace editor is becoming more and more problematic, and the Moodle JavaScript minifier (<moodlehome>/lib/classes/minify.php and support classes) is a large part of the problem. It uses regular expression matching with some huge patterns (e.g. 14,000 characters). It seems that unless globally disabled by use of the $CFG->jsrev parameter, the minimisation is applied to any javascript file you load, unless the minimised version is already in cache. The Ace editor is a very large JavaScript file and the minimiser churns away at it for 10 seconds or more. On some systems, e.g. the latest Bitnami Moodle containers, it takes so long that the browser times out, so you never get to load Ace. Turning off the minimiser altogether loads Ace in a couple of seconds.
I would like to be able to minify Ace myself and have Moodle just load that minified version. Does anyone (Tim?) know if there's a way to do that?