Skip to content

Instantly share code, notes, and snippets.

@tmoreira2020
Last active December 8, 2016 18:37
Show Gist options
  • Save tmoreira2020/8a83f6ffe065590b92140b20ccb6b533 to your computer and use it in GitHub Desktop.
Save tmoreira2020/8a83f6ffe065590b92140b20ccb6b533 to your computer and use it in GitHub Desktop.
<#assign time1 = .now?time?long>
<#assign perf_count = 0>
<#assign service = serviceLocator.findService("com.liferay.journal.util.JournalContent") >
<#assign model = objectUtil("com.liferay.portal.kernel.portlet.PortletRequestModel", renderRequest, renderResponse)>
<#if entries?has_content>
<#list entries as curEntry>
<#assign renderer = curEntry.getAssetRenderer()>
<#assign article = renderer.getArticle()>
<#assign html2 = service.getContent(article.getGroupId(), article.getArticleId(), article.getTemplateId(), "view", locale.toString(), model, themeDisplay)>
<#assign perf_count = perf_count + 1>
CC ${html2} CC
</#list>
</#if>
<#assign time2 = .now?time?long>
Tempo: ${time2 - time1} </br>
Quantidade: ${perf_count} </br>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment