Did a quick test and the parsing time for the comments seems negligible. More precisely:
I executed 100000 velocity parsing with and without the license header and I got:
With:
- time1 = 19669, time2 = 19261, time3 = 19538
- avg = 19489 ms
Without:
- time1 = 17623, time2 = 16538, time3 = 16255
- avg = 16805
Difference = 2685ms
This means 0.02 ms of difference for one parsing. Negligible.
My inputs:
input 1:
new StringReader("###\n"
+ "### Annotations page in the \"view\" mode\n"
+ "###\n"
+ "###\n"
+ "#if(\"$!request.xpage\" == 'annotations')\n"
+ " $response.sendRedirect($doc.getURL('view', 'viewer=annotations'))\n"
+ "#else\n"
+ " #set($titleToDisplay = $services.localization.render('core.viewers.annotations.title', [\"<a href='$doc.getURL()'>$escapetool.xml($doc.getPlainTitle())</a>\"]))\n"
+ " #template('contentheader.vm')\n"
+ " #template(\"annotationsinline.vm\")\n"
+ "#end"));
input 2:
new StringReader("##---------------------------------------------------------------------------\n"
+ "## See the NOTICE file distributed with this work for additional\n"
+ "## information regarding copyright ownership.\n"
+ "##\n"
+ "## This is free software; you can redistribute it and/or modify it\n"
+ "## under the terms of the GNU Lesser General Public License as\n"
+ "## published by the Free Software Foundation; either version 2.1 of\n"
+ "## the License, or (at your option) any later version.\n"
+ "##\n"
+ "## This software is distributed in the hope that it will be useful,\n"
+ "## but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+ "## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n"
+ "## Lesser General Public License for more details.\n"
+ "##\n"
+ "## You should have received a copy of the GNU Lesser General Public\n"
+ "## License along with this software; if not, write to the Free\n"
+ "## Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n"
+ "## 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n"
+ "## ---------------------------------------------------------------------------\n"
+ "###\n"
+ "### Annotations page in the \"view\" mode\n"
+ "###\n"
+ "###\n"
+ "#if(\"$!request.xpage\" == 'annotations')\n"
+ " $response.sendRedirect($doc.getURL('view', 'viewer=annotations'))\n"
+ "#else\n"
+ " #set($titleToDisplay = $services.localization.render('core.viewers.annotations.title', [\"<a href='$doc.getURL()'>$escapetool.xml($doc.getPlainTitle())</a>\"]))\n"
+ " #template('contentheader.vm')\n"
+ " #template(\"annotationsinline.vm\")\n"
+ "#end\n"));
So, in addition the comments represent a large portion of this template which makes it worse than the reality probably.