Improved: Performance optimization for entities in xml data export.
Thanks Kyra Pritzel-Hentley for reporting and providing the patch.
@@ -180,7 +180,7 @@ if (passedEntityNames) {
session.setAttribute("xmlrawdump_entitylist", passedEntityNames)
session.setAttribute("entityDateCond", entityDateCond)
} else {
- efo = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true)
+ efo = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, false)
numberOfEntities = passedEntityNames?.size() ?: 0
context.numberOfEntities = numberOfEntities
numberWritten = 0
@@ -206,9 +206,9 @@ if (passedEntityNames) {
try {
me = reader.getModelEntity(curEntityName)
if (me.getNoAutoStamp() || me instanceof ModelViewEntity) {
- values = delegator.find(curEntityName, null, null, null, me.getPkFieldNames(), efo)
+ values = delegator.find(curEntityName, null, null, null, null, efo)
} else {
- values = delegator.find(curEntityName, entityDateCond, null, null, UtilMisc.toList("-createdTxStamp"), efo)
+ values = delegator.find(curEntityName, entityDateCond, null, null, null, efo)
}
curNumberWritten = 0
@@ -261,9 +261,9 @@ if (passedEntityNames) {
return
}
if (me.getNoAutoStamp() || me instanceof ModelViewEntity) {
- values = delegator.find(curEntityName, null, null, null, me.getPkFieldNames(), efo)
+ values = delegator.find(curEntityName, null, null, null, null, efo)
} else {
- values = delegator.find(curEntityName, entityDateCond, null, null, me.getPkFieldNames(), efo)
+ values = delegator.find(curEntityName, entityDateCond, null, null, null, efo)
}
isFirst = true
writer = null
