The metadata files that constitute a site "page" are combined during compilation, avoiding the server requests that are normally required at runtime. You're effectively moving the per-page-view render cost to a one-off compile-time cost.
Performance improvements are achieved by reducing the number of runtime requests. This can include avoiding all content queries because you can compile the results of these queries directly into the page.
Behavioral improvements are achieved because a page renders immediately. Therefore, you can avoid issues such as "flash of unstyled content" or having components appear on the page in an indeterminate order, such as where the footer appears immediately and then moves down the page as the other items on the page render.
To compile the pages within an Oracle Content Management site, you need to export the site as a template and then use the OCE Toolkit to compile the template and upload the static pages produced to the original site. The following steps walk you through the template compilation process and then how to use this model to compile your sites.
Interaction with Prerender
The static pages created by site compilation are expected to run in the browser and behave exactly as the original dynamic sites page. This includes running noncompiled components dynamically and executing runtime queries where the user wants completely up-to-date data in the results rather than fixing the data at compile time.
When the prerender solution is enabled by the tenant administrator, static pages can also be delivered through the prerender server. This lets indexers and crawlers handle portions of static pages that may still render dynamically, like content lists.
Content queries return content items that include rich text field values, so you don't need to fetch the values separately when content layouts are used for content lists.
Controller Site Page Rendering
cec compile-template command enables site pages to
render directly in the browser, without going through the Oracle Content Management site page controller.
Without using the compiler to create static HTML pages, an Oracle Content Management site uses a controller model to render pages. This involves a number of requests to get information about the site, the page within the site, and templates used to render the page before it can actually be displayed in the browser.
There are more requests involved, such as getting the
Compiled Site Page Rendering
cec compile-template command lets you compile all these
steps into a static HTML file and improves performance of runtime sites by reducing or
eliminating these server requests. In addition, you can further reduce requests for
resources that need not change at runtime and have them compiled into the static pages.
The default compilation process does the work of the existing runtime controller,
creating a physical HTML page for each
page.json file in the site.
These pages can then be deployed to the site and will be published with the site and
used when the corresponding page URL is hit.