You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2017/12/31 16:58:04 UTC

[isis] branch master updated: ISIS-1774: adds 'isis.persistor.datanucleus.standaloneCollection.bulkLoad' configuration property and more efficient implementation ...

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new e042f4a  ISIS-1774: adds 'isis.persistor.datanucleus.standaloneCollection.bulkLoad' configuration property and more efficient implementation ...
e042f4a is described below

commit e042f4a3d76b335bbf09160e5d61d905148fde8f
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sun Dec 31 16:25:41 2017 +0000

    ISIS-1774: adds 'isis.persistor.datanucleus.standaloneCollection.bulkLoad' configuration property and more efficient implementation ...
    
    ... to load objects for rendering of a standalone collection (result of an action invocation).
---
 .../guides/ugodn/_ugodn_configuring_bulk-load.adoc |  36 +++++
 .../ugodn/_ugodn_configuring_properties.adoc       |  37 +++--
 .../ugvw/_ugvw_configuration-properties.adoc       |   3 +-
 .../system/persistence/PersistenceSession.java     | 158 ++++++++++++++++++---
 .../model/mementos/ObjectAdapterMemento.java       |  13 +-
 .../wicket/model/models/EntityCollectionModel.java |  46 +++++-
 .../CollectionContentsSortableDataProvider.java    |  16 ++-
 .../manifest/persistor_datanucleus.properties      |   8 ++
 8 files changed, 274 insertions(+), 43 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/ugodn/_ugodn_configuring_bulk-load.adoc b/adocs/documentation/src/main/asciidoc/guides/ugodn/_ugodn_configuring_bulk-load.adoc
new file mode 100644
index 0000000..574c325
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/ugodn/_ugodn_configuring_bulk-load.adoc
@@ -0,0 +1,36 @@
+[[_ugodn_configuring_bulk-load]]
+= Bulk Load of Standalone Collections (`1.16.0-SNAPSHOT`)
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
+:_basedir: ../../
+:_imagesdir: images/
+
+
+The implementation of user interactions (meaning either an action invocations or a property edits) in the xref:../ugvw/ugvw.adoc#[Wicket viewer] is splits into two.
+The first phase performs the actual interaction, with the results (dirtied objects) flushed to the database.
+The second phase then renders the results of the interaction.
+
+When the user interaction in question is an action invocation that returns a list of objects, the resultant list is not rendered in the first phase.
+Instead, only the IDs of the objects in the list are captured.
+When the list is then rendered, the framework re-loads each object.
+
+The default implementation does this row-by-row, resulting in multiple queries against the database.
+Setting the property:
+
+[source,ini]
+----
+isis.persistor.datanucleus.standaloneCollection.bulkLoad=true
+----
+
+changes to a more efficient implementation that bulk loads all the objects using a single query.
+
+
+[NOTE]
+====
+In the future the bulkLoad implementation may be made the default.
+====
+
+[NOTE]
+====
+The implementation of parented collections does not suffer from this issue; the rendering phase runs the query to obtain the matches.
+====
+
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugodn/_ugodn_configuring_properties.adoc b/adocs/documentation/src/main/asciidoc/guides/ugodn/_ugodn_configuring_properties.adoc
index 8af569d..a9e456e 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugodn/_ugodn_configuring_properties.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugodn/_ugodn_configuring_properties.adoc
@@ -11,7 +11,7 @@ These configuration properties are typically stored in `WEB-INF/persistor_datanu
 
 
 .JDO/DataNucleus Objectstore Configuration Properties
-[cols="2a,1,3a", options="header"]
+[cols="2a,2a,2a", options="header"]
 |===
 |Property
 |Value +
@@ -20,23 +20,44 @@ These configuration properties are typically stored in `WEB-INF/persistor_datanu
 
 |`isis.persistor.` +
 `datanucleus.` +
+`standaloneCollection.` +
+`bulkLoad`
+|`true`, `false` +
+(`false`)
+|(`1.16.0-SNAPSHOT`) Enables bulk load of standalone collections.
+
+Further xref:../ugodn/ugodn.adoc#_ugodn_configuring_bulk-load[discussion below].
+
+|`isis.persistor.` +
+`datanucleus.` +
 `classMetadataLoadedListener`
 |`FQCN`
-|The default (`o.a.i.os.jdo.dn.CreateSchemaObjectFromClassMetadata`) creates a DB schema object
+`o.a.i.os.` +
+`jdo.dn.` +
+`CreateSchemaObject` +
+`FromClassMetadata`
+|The default implementation creates a DB schema object.
 
+There generally is no need to change this from its default.
 
-|`isis.persistor.datanucleus.` +
-`RegisterEntities.packagePrefix`
-|fully qualified package names (CSV)
-|that specifies the entities early rather than allow DataNucleus to find the entities lazily.  Further xref:../ugodn/ugodn.adoc#_ugodn_configuring_eagerly-registering-entities[discussion below].
+|`isis.persistor.` +
+`datanucleus.` +
+`RegisterEntities.` +
+`packagePrefix`
+|fully qualified package names +
+(CSV)
+|(As of `1.16.0-SNAPSHOT`), this property is ignored.
 
-This property is IGNORED if the xref:../rgcfg/rgcfg.adoc#_rgcfg_specifying-components[`isis.appManifest`] configuration property is specified, or if an xref:../rgcms/rgcms.adoc#_rgcms_classes_super_AppManifest[`AppManifest`] is provided programmatically.
+The property is now an implementation detail, automatically derived from the set of modules provided in the xref:../rgcms/rgcms.adoc#_rgcms_classes_super_AppManifest[`AppManifest`].
+
+It holds the set of packages to search so that DataNucleus builds its metamodel eagerly rather than lazily.
+Further xref:../ugodn/ugodn.adoc#_ugodn_configuring_eagerly-registering-entities[discussion below].
 
 
 |`isis.persistor.datanucleus.` +
 `PublishingService.serializedForm`
 | zipped
-|
+|(`PublishingService` is deprecated, and so therefore so is this property).
 
 |===
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_configuration-properties.adoc b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_configuration-properties.adoc
index c410a80..5959312 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_configuration-properties.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_configuration-properties.adoc
@@ -185,7 +185,8 @@ Setting this option retains the behaviour of the viewer pre-`1.15.0`.
 | Ignored for 1.8.0+; in earlier versions forced regular case rather than title case in the UI
 
 |`isis.viewer.wicket.` +
-`replaceDisabledTagWithReadonlyTag`
+`replaceDisabledTag`- +
+`WithReadonlyTag`
 | `true`,`false` +
 (`_true_`)
 | Whether to replace 'disabled' tag with 'readonly' (for link:https://www.w3.org/TR/2014/REC-html5-20141028/forms.html#the-readonly-attribute[w3 spec]-compliant browsers such as for Firefox and Chrome 54+) which prevent copy from 'disabled' fields.
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
index 1dfacc4..67d83b4 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
@@ -22,6 +22,8 @@ import java.lang.reflect.Array;
 import java.lang.reflect.Modifier;
 import java.sql.Timestamp;
 import java.text.MessageFormat;
+import java.util.Collection;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
@@ -30,12 +32,15 @@ import javax.jdo.FetchGroup;
 import javax.jdo.FetchPlan;
 import javax.jdo.PersistenceManager;
 import javax.jdo.PersistenceManagerFactory;
+import javax.jdo.identity.SingleFieldIdentity;
 import javax.jdo.listener.InstanceLifecycleListener;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 
 import org.datanucleus.enhancement.Persistable;
+import org.datanucleus.exceptions.NucleusObjectNotFoundException;
+import org.datanucleus.identity.DatastoreIdImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -935,7 +940,7 @@ public class PersistenceSession implements
                             LOG.debug("getObject; oid=" + oid);
                         }
 
-                        final Object pojo = loadPojo(oid);
+                        final Object pojo = loadPersistentPojo(oid);
                         return mapRecreatedPojo(oid, pojo);
                     }
                 });
@@ -944,9 +949,9 @@ public class PersistenceSession implements
 
     //endregion
 
-    //region > loadPojo
+    //region > loadPersistentPojo
 
-    public Object loadPojo(final RootOid rootOid) {
+    private Object loadPersistentPojo(final RootOid rootOid) {
 
         Object result;
         try {
@@ -980,6 +985,63 @@ public class PersistenceSession implements
         return result;
     }
 
+    private Map<RootOid,Object> loadPersistentPojos(final List<RootOid> rootOids) {
+
+        if(rootOids.isEmpty()) {
+            return zip(rootOids, Collections.emptyList());
+        }
+
+        final List<Object> dnOids = Lists.newArrayList();
+        for (final RootOid rootOid : rootOids) {
+            final Object id = JdoObjectIdSerializer.toJdoObjectId(rootOid);
+            if(id instanceof SingleFieldIdentity) {
+                dnOids.add(id);
+            } else if (id instanceof String && ((String) id).contains("[OID]")) {
+                final DatastoreIdImpl datastoreId = new DatastoreIdImpl((String)id);
+                dnOids.add(datastoreId);
+            } else {
+                // application identity
+                final DatastoreIdImpl datastoreId = new DatastoreIdImpl(clsOf(rootOid).getName(), id);
+                dnOids.add(datastoreId);
+            }
+        }
+        FetchPlan fetchPlan = persistenceManager.getFetchPlan();
+        fetchPlan.addGroup(FetchGroup.DEFAULT);
+        final List<Object> persistentPojos = Lists.newArrayList();
+        try {
+            final Collection<Object> pojos = persistenceManager.getObjectsById(dnOids, true);
+            for (final Object pojo : pojos) {
+                try {
+                    persistentPojos.add(pojo);
+                } catch(Exception ex) {
+                    persistentPojos.add(null);
+                }
+            }
+        } catch(NucleusObjectNotFoundException nonfe) {
+            // at least one not found; fall back to loading one by one
+            for (final Object dnOid : dnOids) {
+                try {
+                    final Object persistentPojo = persistenceManager.getObjectById(dnOid);
+                    persistentPojos.add(persistentPojo);
+                } catch(Exception ex) {
+                    persistentPojos.add(null);
+                }
+            }
+        }
+        Map<RootOid, Object> pojoByOid = zip(rootOids, persistentPojos);
+        return pojoByOid;
+    }
+
+    private static Map<RootOid, Object> zip(final List<RootOid> rootOids, final Collection<Object> pojos) {
+        final Map<RootOid,Object> pojoByOid = Maps.newLinkedHashMap();
+        int i = 0;
+        for (final Object pojo : pojos) {
+            final RootOid rootOid = rootOids.get(i++);
+            pojoByOid.put(rootOid, pojo);
+        }
+        return pojoByOid;
+    }
+
     private Class<?> clsOf(final RootOid oid) {
         final ObjectSpecification objectSpec = getSpecificationLoader().lookupBySpecId(oid.getObjectSpecId());
         return objectSpec.getCorrespondingClass();
@@ -1517,6 +1579,61 @@ public class PersistenceSession implements
         }
     }
 
+    public Map<RootOid, ObjectAdapter> adaptersFor(final List<RootOid> rootOids) {
+        return adaptersFor(rootOids, ConcurrencyChecking.NO_CHECK);
+    }
+
+    public Map<RootOid,ObjectAdapter> adaptersFor(
+            final List<RootOid> rootOids,
+            final ConcurrencyChecking concurrencyChecking) {
+
+        final Map<RootOid, ObjectAdapter> adapterByOid = Maps.newLinkedHashMap();
+
+        List<RootOid> notYetLoadedOids = Lists.newArrayList();
+        for (RootOid rootOid : rootOids) {
+            // attempt to locate adapter for the Oid
+            ObjectAdapter adapter = getAdapterFor(rootOid);
+            // handle view models or transient
+            if (adapter == null) {
+                if (rootOid.isTransient() || rootOid.isViewModel()) {
+                    final Object pojo = recreatePojoTransientOrViewModel(rootOid);
+                    adapter = mapRecreatedPojo(rootOid, pojo);
+                    sync(concurrencyChecking, adapter, rootOid);
+                }
+            }
+            if (adapter != null) {
+                adapterByOid.put(rootOid, adapter);
+            } else {
+                // persistent oid, to load in bulk
+                notYetLoadedOids.add(rootOid);
+            }
+        }
+
+        // recreate, in bulk, all those not yet loaded
+        final Map<RootOid, Object> pojoByOid = loadPersistentPojos(notYetLoadedOids);
+        for (Map.Entry<RootOid, Object> entry : pojoByOid.entrySet()) {
+            final RootOid rootOid = entry.getKey();
+            final Object pojo = entry.getValue();
+            if(pojo != null) {
+                ObjectAdapter adapter;
+                try {
+                    adapter = mapRecreatedPojo(rootOid, pojo);
+                    adapterByOid.put(rootOid, adapter);
+                } catch(ObjectNotFoundException ex) {
+                    throw ex; // just rethrow
+                } catch(RuntimeException ex) {
+                    throw new PojoRecreationException(rootOid, ex);
+                }
+                sync(concurrencyChecking, adapter, rootOid);
+            } else {
+                // null indicates it couldn't be loaded
+                // do nothing here...
+            }
+        }
+
+        return adapterByOid;
+    }
+
     /**
      * As per {@link #adapterFor(RootOid, ConcurrencyChecking)}, with
      * {@link ConcurrencyChecking#NO_CHECK no checking}.
@@ -1567,7 +1684,12 @@ public class PersistenceSession implements
         if (adapter == null) {
             // else recreate
             try {
-                final Object pojo = recreatePojo(rootOid);
+                final Object pojo;
+                if(rootOid.isTransient() || rootOid.isViewModel()) {
+                    pojo = recreatePojoTransientOrViewModel(rootOid);
+                } else {
+                    pojo = loadPersistentPojo(rootOid);
+                }
                 adapter = mapRecreatedPojo(rootOid, pojo);
             } catch(ObjectNotFoundException ex) {
                 throw ex; // just rethrow
@@ -1577,6 +1699,17 @@ public class PersistenceSession implements
         }
 
         // sync versions of original, with concurrency checking if required
+        sync(concurrencyChecking, adapter, rootOid);
+
+        return adapter;
+    }
+
+
+
+    private void sync(
+            final ConcurrencyChecking concurrencyChecking,
+            final ObjectAdapter adapter, final RootOid rootOid) {
+        // sync versions of original, with concurrency checking if required
         Oid adapterOid = adapter.getOid();
         if(adapterOid instanceof RootOid) {
             final RootOid recreatedOid = (RootOid) adapterOid;
@@ -1589,8 +1722,8 @@ public class PersistenceSession implements
                     final Version otherVersion = originalOid.getVersion();
                     final Version thisVersion = recreatedOid.getVersion();
                     if( thisVersion != null &&
-                        otherVersion != null &&
-                        thisVersion.different(otherVersion)) {
+                            otherVersion != null &&
+                            thisVersion.different(otherVersion)) {
 
                         if(concurrencyCheckingGloballyEnabled && ConcurrencyChecking.isCurrentlyEnabled()) {
                             LOG.info("concurrency conflict detected on " + recreatedOid + " (" + otherVersion + ")");
@@ -1615,20 +1748,9 @@ public class PersistenceSession implements
                 }
             }
         }
-
-        return adapter;
-    }
-
-
-    private Object recreatePojo(RootOid oid) {
-        if(oid.isTransient() || oid.isViewModel()) {
-            return recreatePojoDefault(oid);
-        } else {
-            return loadPojo(oid);
-        }
     }
 
-    private Object recreatePojoDefault(final RootOid rootOid) {
+    private Object recreatePojoTransientOrViewModel(final RootOid rootOid) {
         final ObjectSpecification spec =
                 specificationLoader.lookupBySpecId(rootOid.getObjectSpecId());
         final Object pojo;
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java
index 1b1c5c5..6b77b0a 100644
--- a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java
+++ b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java
@@ -648,9 +648,9 @@ public class ObjectAdapterMemento implements Serializable {
                 final SpecificationLoader specificationLoader) {
             return new Function<ObjectAdapterMemento, ObjectAdapter>() {
                 @Override
-                public ObjectAdapter apply(final ObjectAdapterMemento from) {
+                public ObjectAdapter apply(final ObjectAdapterMemento memento) {
                     try {
-                        return from.getObjectAdapter(concurrencyChecking, persistenceSession, specificationLoader);
+                        return memento.getObjectAdapter(concurrencyChecking, persistenceSession, specificationLoader);
                     } catch (ObjectNotFoundException e) {
                         // this can happen if for example the object is not visible (due to the security tenanted facet)
                         return null;
@@ -687,6 +687,15 @@ public class ObjectAdapterMemento implements Serializable {
                 }
             };
         }
+
+        public static Function<ObjectAdapterMemento, RootOid> toOid() {
+            return new Function<ObjectAdapterMemento, RootOid>() {
+                                @Override
+                                public RootOid apply(final ObjectAdapterMemento objectAdapterMemento) {
+                                    return RootOid.create(objectAdapterMemento.asBookmark());
+                                }
+                            };
+        }
     }
 
     private void ensureScalar() {
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityCollectionModel.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityCollectionModel.java
index 22fcf1a..923980a 100644
--- a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityCollectionModel.java
+++ b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityCollectionModel.java
@@ -20,12 +20,15 @@
 package org.apache.isis.viewer.wicket.model.models;
 
 import java.io.Serializable;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
+import java.util.Map;
 
 import com.google.common.base.Function;
 import com.google.common.base.Predicates;
+import com.google.common.collect.FluentIterable;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 
@@ -38,6 +41,7 @@ import org.apache.isis.core.commons.lang.Closure;
 import org.apache.isis.core.commons.lang.IterableExtensions;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager.ConcurrencyChecking;
+import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
 import org.apache.isis.core.metamodel.facets.collections.sortedby.SortedByFacet;
 import org.apache.isis.core.metamodel.facets.object.paged.PagedFacet;
@@ -46,6 +50,7 @@ import org.apache.isis.core.metamodel.spec.ObjectSpecId;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
+import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
 import org.apache.isis.core.runtime.system.session.IsisSessionFactory;
 import org.apache.isis.viewer.wicket.model.hints.UiHintContainer;
 import org.apache.isis.viewer.wicket.model.links.LinkAndLabel;
@@ -67,10 +72,11 @@ public class EntityCollectionModel extends ModelAbstract<List<ObjectAdapter>> im
 
     private static final long serialVersionUID = 1L;
 
+    private static final String KEY_BULK_LOAD = "isis.persistor.datanucleus.standaloneCollection.bulkLoad";
+
     private static final int PAGE_SIZE_DEFAULT_FOR_PARENTED = 12;
     private static final int PAGE_SIZE_DEFAULT_FOR_STANDALONE = 25;
 
-
     public enum Type {
         /**
          * A simple list of object mementos, eg the result of invoking an action
@@ -81,12 +87,38 @@ public class EntityCollectionModel extends ModelAbstract<List<ObjectAdapter>> im
         STANDALONE {
             @Override
             List<ObjectAdapter> load(final EntityCollectionModel entityCollectionModel) {
-                return Lists.newArrayList(
-                        Iterables.filter(
-                                Iterables.transform(entityCollectionModel.mementoList,
-                                        ObjectAdapterMemento.Functions.fromMemento(ConcurrencyChecking.NO_CHECK,
-                                                entityCollectionModel.getPersistenceSession(), entityCollectionModel.getSpecificationLoader())),
-                                Predicates.notNull()));
+
+                final boolean bulkLoad = entityCollectionModel.getPersistenceSession().getConfiguration()
+                        .getBoolean(KEY_BULK_LOAD, false);
+                final Iterable<ObjectAdapter> values = bulkLoad
+                                ? loadInBulk(entityCollectionModel)
+                                : loadOneByOne(entityCollectionModel);
+                return Lists.newArrayList(values);
+            }
+
+            private Iterable<ObjectAdapter> loadInBulk(final EntityCollectionModel model) {
+                final List<ObjectAdapterMemento> mementoList = model.mementoList;
+
+                final PersistenceSession persistenceSession = model.getPersistenceSession();
+
+                final List<RootOid> rootOids = FluentIterable.from(mementoList)
+                        .transform(ObjectAdapterMemento.Functions.toOid()).toList();
+
+                final Map<RootOid, ObjectAdapter> adaptersByOid = persistenceSession.adaptersFor(rootOids);
+                final Collection<ObjectAdapter> adapterList = adaptersByOid.values();
+                return FluentIterable.from(adapterList)
+                        .filter(Predicates.<ObjectAdapter>notNull());
+            }
+
+            private Iterable<ObjectAdapter> loadOneByOne(final EntityCollectionModel model) {
+                final List<ObjectAdapterMemento> mementoList = model.mementoList;
+                return FluentIterable.from(mementoList)
+                            .transform(
+                                ObjectAdapterMemento.Functions.fromMemento(
+                                        ConcurrencyChecking.NO_CHECK,
+                                        model.getPersistenceSession(),
+                                        model.getSpecificationLoader()))
+                            .filter(Predicates.notNull());
             }
 
             @Override
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsSortableDataProvider.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsSortableDataProvider.java
index c032e58..f3f01d2 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsSortableDataProvider.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsSortableDataProvider.java
@@ -19,10 +19,19 @@
 
 package org.apache.isis.viewer.wicket.ui.components.collectioncontents.ajaxtable;
 
+import java.util.Iterator;
+import java.util.List;
+
 import com.google.common.base.Predicate;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Ordering;
+
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.model.IModel;
+
 import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
@@ -35,13 +44,6 @@ import org.apache.isis.core.metamodel.spec.ObjectSpecificationException;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.viewer.wicket.model.models.EntityCollectionModel;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
-import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
-import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;
-import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
-import org.apache.wicket.model.IModel;
-
-import java.util.Iterator;
-import java.util.List;
 
 /**
  * Part of the {@link AjaxFallbackDefaultDataTable} API.
diff --git a/example/application/simpleapp/application/src/main/resources/domainapp/application/manifest/persistor_datanucleus.properties b/example/application/simpleapp/application/src/main/resources/domainapp/application/manifest/persistor_datanucleus.properties
index d81f9b9..9a3ff17 100644
--- a/example/application/simpleapp/application/src/main/resources/domainapp/application/manifest/persistor_datanucleus.properties
+++ b/example/application/simpleapp/application/src/main/resources/domainapp/application/manifest/persistor_datanucleus.properties
@@ -33,6 +33,14 @@
 isis.persistor.disableConcurrencyChecking=false
 
 
+
+#
+# If enabled, uses a more efficient implementation to render standalone collections.
+# default is 'false' (disabled)
+#
+isis.persistor.datanucleus.standaloneCollection.bulkLoad=true
+
+
 #
 # hook to perform additional initialization when JDO class metadata is loaded
 # default implementation will attempt to run 'create schema' for the specified schema.

-- 
To stop receiving notification emails like this one, please contact
['"commits@isis.apache.org" <co...@isis.apache.org>'].