Skip to content

Instantly share code, notes, and snippets.

@nshaw
Created September 10, 2012 21:05
Show Gist options
  • Save nshaw/3693859 to your computer and use it in GitHub Desktop.
Save nshaw/3693859 to your computer and use it in GitHub Desktop.
patch for PortletExporter.java:exportAssetTags(PortletDataContext) to improve page publishing performance
for (AssetTag assetTag : assetTags) {
// CUSTOM START
// By only exporting tags that are more recent than the export start
// date of the Layout, we assume that at some point in time the
// exporting Site and the importing Site had exactly the same Tags,
// and that every Layout export will harvest any tags not found in
// the importing Site
if(portletDataContext.hasDateRange()) {
int diff = DateUtil.compareTo(portletDataContext.getStartDate(),
assetTag.getModifiedDate());
if(diff == 0 || diff < 0) {
exportAssetTag(portletDataContext, assetTag, rootElement);
}
} else {
exportAssetTag(portletDataContext, assetTag, rootElement);
}
// CUSTOM END
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment