Enabling/Disabling Profiling

Profiling is not enabled by default, because it incurs a small (less than 1%) performance penalty. You can turn profiling on by setting the application scope attribute neo.util.servlet.RequestInfo.StatisticsSource as follows:


To turn profiling off again, simply remove the attribute as follows:


You want to be able to turn profiling on and off at will during template development without exposing the option to users of the publication. A simple way of doing this is to add two JSP files containing these commands to your application: profiling-on.jsp and profiling-off.jsp, for example. You can then easily turn profiling on and off by navigating to these files in your browser. To turn profiling on, for example, you would enter something like this in your browser's address field:


and something like this to turn it off again:


where publication is the name of your publication.