I have just noticed that the edocman link calls all of the asssociated files for modal, even when the option isn't enabled.
This adds a lot of weight to the page.
Is there any way that you can wrap the behaviour call round an if statement so it is only triggered when the option is enabled?
This line
JHtml::_('behavior.modal', 'a.edocman-modal')
Thanks