As reported in
http://www.freelists.org/post/dokuwiki/Loading-images-from-media-manager-on-every-page and reproduced by me, the icons that are used in the media insert dialogue are loaded on every page which adds 12 useless http request to every page load (unless they are cached already). This happens because the media manager initialization function in lib/scripts/media.js is executed regardless if the current page contains the media manager or not and in this function, the popup for inserting images or links into pages is initialized, which contains these icons.
Can't we simply detect at the beginning of the init function if the current page contains the media manager and if not skip the whole initialization?