Created
September 10, 2012 21:05
-
-
Save nshaw/3693859 to your computer and use it in GitHub Desktop.
patch for PortletExporter.java:exportAssetTags(PortletDataContext) to improve page publishing performance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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