last month i introduced a precompile "batch" file that allowed you to manually compile cfmx templates, saving the penalty paid by the first user to browse a cfmx template after it was created or edited.
but there will be curious folks (and bit-twiddlers) among you who will want to know more - maybe lots more. how much time is this really saving? if its compiled to disk, how and when does cfmx read it into memory to execute it? whats the cost of that? what happens with cfincluded files? where does the compiled code go? can i look at it? can i just delete the generated class files instead? how do i determine which class file was generated for which cf template? can i distribute the compiled code on other servers without the source code?
ill address these questions and more in this conclusion.
evaluating the execution time
before going on, it may be helpful to explain something about determining the impact in terms of execution (and other startup) times for running a template. it will be very helpful to turn on the "report execution times" option in the coldfusion administrator settings for "debugging settings". this will produce a display (see table 1) at the bottom of a page when executed in a browser.as in previous releases, you will only see this debugging information if the administrator has enabled it. also, if any ip addresses are listed in the "debugging ip addresses" page of the administrator, then you will only see it if you are in that list. if there are no values in that list, all who execute cf templates on the server will see this info. finally, if you still dont see this information, be sure that your template (or the application.cfm that is called before it) does not have <cfsetting showdebugoutput="no">.
this particular example shows a file called test.cfm, which included a file called test.html, and also had an application.cfm that was called. it also shows a separate value for "startup, parsing, compili... 下一页