[exo-jcr-commits] exo-jcr SVN: r4602 - in jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl: core/nodetype/registration and 4 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Jul 5 11:14:00 EDT 2011
Author: nfilotto
Date: 2011-07-05 11:13:59 -0400 (Tue, 05 Jul 2011)
New Revision: 4602
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/JCRNodeTypeDataPersister.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/QueryImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/CachingIndexReader.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChildAxisQuery.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DescendantSelfAxisQuery.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DocOrderScoreNodeIterator.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/QueryResultImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/RowIteratorImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/indexing/JdbcNodeDataIndexingIterator.java
Log:
EXOJCR-1426: Cleanup the code to get rid of useless System.currentTimeMillis() calls
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java 2011-07-05 14:46:12 UTC (rev 4601)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java 2011-07-05 15:13:59 UTC (rev 4602)
@@ -1037,9 +1037,10 @@
public NodeIterator getNodes() throws RepositoryException
{
- long start = System.currentTimeMillis();
+ long start = 0;
if (LOG.isDebugEnabled())
{
+ start = System.currentTimeMillis();
LOG.debug("getNodes() >>>>>");
}
@@ -1086,9 +1087,10 @@
public NodeIterator getNodes(String namePattern) throws RepositoryException
{
- long start = System.currentTimeMillis();
+ long start = 0;
if (LOG.isDebugEnabled())
{
+ start = System.currentTimeMillis();
LOG.debug("getNodes(String) >>>>>");
}
@@ -1197,9 +1199,10 @@
public PropertyIterator getProperties() throws RepositoryException
{
- long start = System.currentTimeMillis();
+ long start = 0;
if (LOG.isDebugEnabled())
{
+ start = System.currentTimeMillis();
LOG.debug("getProperties() >>>>>");
}
@@ -1252,9 +1255,10 @@
*/
public PropertyIterator getProperties(String namePattern) throws RepositoryException
{
- long start = System.currentTimeMillis();
+ long start = 0;
if (LOG.isDebugEnabled())
{
+ start = System.currentTimeMillis();
LOG.debug("getProperties(String) >>>>>");
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2011-07-05 14:46:12 UTC (rev 4601)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2011-07-05 15:13:59 UTC (rev 4602)
@@ -364,9 +364,10 @@
public ItemImpl getItem(NodeData parent, QPathEntry name, boolean pool, ItemType itemType, boolean apiRead)
throws RepositoryException
{
- long start = System.currentTimeMillis();
+ long start = 0;
if (log.isDebugEnabled())
{
+ start = System.currentTimeMillis();
log.debug("getItem(" + parent.getQPath().getAsString() + " + " + name.getAsString() + " ) >>>>>");
}
@@ -426,9 +427,10 @@
public ItemImpl getItem(NodeData parent, QPathEntry name, boolean pool, boolean skipCheckInPersistence,
ItemType itemType) throws RepositoryException
{
- long start = System.currentTimeMillis();
+ long start = 0;
if (log.isDebugEnabled())
{
+ start = System.currentTimeMillis();
log.debug("getItem(" + parent.getQPath().getAsString() + " + " + name.getAsString() + " ) >>>>>");
}
@@ -485,9 +487,10 @@
public ItemImpl getItem(NodeData parent, QPathEntry[] relPath, boolean pool, ItemType itemType)
throws RepositoryException
{
- long start = System.currentTimeMillis();
+ long start = 0;
if (log.isDebugEnabled())
{
+ start = System.currentTimeMillis();
String debugPath = "";
for (QPathEntry rp : relPath)
{
@@ -529,9 +532,10 @@
*/
public ItemImpl getItem(QPath path, boolean pool) throws RepositoryException
{
- long start = System.currentTimeMillis();
+ long start = 0;
if (log.isDebugEnabled())
{
+ start = System.currentTimeMillis();
log.debug("getItem(" + path.getAsString() + " ) >>>>>");
}
@@ -649,9 +653,10 @@
*/
public ItemImpl getItemByIdentifier(String identifier, boolean pool, boolean apiRead) throws RepositoryException
{
- long start = System.currentTimeMillis();
+ long start = 0;
if (log.isDebugEnabled())
{
+ start = System.currentTimeMillis();
log.debug("getItemByIdentifier(" + identifier + " ) >>>>>");
}
@@ -850,9 +855,10 @@
public List<NodeImpl> getChildNodes(NodeData parent, boolean pool) throws RepositoryException, AccessDeniedException
{
- long start = System.currentTimeMillis();
+ long start = 0;
if (log.isDebugEnabled())
{
+ start = System.currentTimeMillis();
log.debug("getChildNodes(" + parent.getQPath().getAsString() + ") >>>>>");
}
@@ -903,9 +909,10 @@
AccessDeniedException
{
- long start = System.currentTimeMillis();
+ long start = 0;
if (log.isDebugEnabled())
{
+ start = System.currentTimeMillis();
log.debug("getChildProperties(" + parent.getQPath().getAsString() + ") >>>>>");
}
@@ -941,9 +948,10 @@
*/
public List<NodeData> getChildNodesData(NodeData parent) throws RepositoryException
{
- long start = System.currentTimeMillis();
+ long start = 0;
if (log.isDebugEnabled())
{
+ start = System.currentTimeMillis();
log.debug("getChildNodesData(" + parent.getQPath().getAsString() + ") >>>>>");
}
@@ -967,9 +975,10 @@
public List<NodeData> getChildNodesData(NodeData parent, List<QPathEntryFilter> patternFilters)
throws RepositoryException
{
- long start = System.currentTimeMillis();
+ long start = 0;
if (log.isDebugEnabled())
{
+ start = System.currentTimeMillis();
log.debug("getChildNodesData(" + parent.getQPath().getAsString() + " , itemDataFilter) >>>>>");
}
@@ -1113,9 +1122,10 @@
*/
public AccessControlList getACL(QPath path) throws RepositoryException
{
- long start = System.currentTimeMillis();
+ long start = 0;
if (log.isDebugEnabled())
{
+ start = System.currentTimeMillis();
log.debug("getACL(" + path.getAsString() + " ) >>>>>");
}
@@ -1178,9 +1188,10 @@
public AccessControlList getACL(NodeData parent, QPathEntry name) throws RepositoryException
{
- long start = System.currentTimeMillis();
+ long start = 0;
if (log.isDebugEnabled())
{
+ start = System.currentTimeMillis();
log.debug("getACL(" + parent.getQPath().getAsString() + " + " + name.getAsString() + " ) >>>>>");
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/JCRNodeTypeDataPersister.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/JCRNodeTypeDataPersister.java 2011-07-05 14:46:12 UTC (rev 4601)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/JCRNodeTypeDataPersister.java 2011-07-05 15:13:59 UTC (rev 4602)
@@ -151,8 +151,12 @@
PlainChangesLog changesLog = new PlainChangesLogImpl();
TransientNodeData jcrNodetypes;
- long start = System.currentTimeMillis();
-
+ long start = 0;
+ if (log.isDebugEnabled())
+ {
+ start = System.currentTimeMillis();
+ }
+
if (addACL)
{
InternalQName[] mixins = new InternalQName[]{Constants.EXO_OWNEABLE, Constants.EXO_PRIVILEGEABLE};
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/QueryImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/QueryImpl.java 2011-07-05 14:46:12 UTC (rev 4601)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/QueryImpl.java 2011-07-05 15:13:59 UTC (rev 4602)
@@ -182,7 +182,11 @@
public QueryResult execute() throws RepositoryException
{
checkInitialized();
- long time = System.currentTimeMillis();
+ long time = 0;
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis();
+ }
QueryResult result = query.execute(offset, limit);
if (log.isDebugEnabled())
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/CachingIndexReader.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/CachingIndexReader.java 2011-07-05 14:46:12 UTC (rev 4601)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/CachingIndexReader.java 2011-07-05 15:13:59 UTC (rev 4602)
@@ -448,7 +448,11 @@
*/
private void initializeParents(IndexReader reader) throws IOException
{
- long time = System.currentTimeMillis();
+ long time = 0;
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis();
+ }
final Map docs = new HashMap();
// read UUIDs
collectTermDocs(reader, new Term(FieldNames.UUID, ""), new TermDocsCollector()
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChildAxisQuery.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChildAxisQuery.java 2011-07-05 14:46:12 UTC (rev 4601)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChildAxisQuery.java 2011-07-05 15:13:59 UTC (rev 4602)
@@ -716,10 +716,17 @@
//NodeId id = new NodeId(UUID.fromString(uuid));
try
{
- long time = System.currentTimeMillis();
+ long time = 0;
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis();
+ }
NodeData state = (NodeData)itemMgr.getItemData(uuid);
- time = System.currentTimeMillis() - time;
- log.debug("got NodeState with id {} in {} ms.", uuid, new Long(time));
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis() - time;
+ log.debug("got NodeState with id {} in {} ms.", uuid, new Long(time));
+ }
Iterator<NodeData> entries;
if (nameTest != null)
{
@@ -813,7 +820,11 @@
@Override
public Hits getHits() throws IOException
{
- long time = System.currentTimeMillis();
+ long time = 0;
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis();
+ }
Hits childrenHits = new AdaptingHits();
Hits nameHits = new ScorerHits(nameTestScorer);
int[] docs = new int[1];
@@ -839,9 +850,11 @@
}
}
}
- time = System.currentTimeMillis() - time;
-
- log.debug("Filtered hits in {} ms.", new Long(time));
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis() - time;
+ log.debug("Filtered hits in {} ms.", new Long(time));
+ }
return childrenHits;
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DescendantSelfAxisQuery.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DescendantSelfAxisQuery.java 2011-07-05 14:46:12 UTC (rev 4601)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DescendantSelfAxisQuery.java 2011-07-05 15:13:59 UTC (rev 4602)
@@ -587,7 +587,11 @@
{
if (!contextHitsCalculated)
{
- long time = System.currentTimeMillis();
+ long time = 0;
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis();
+ }
contextScorer.score(new AbstractHitCollector()
{
@Override
@@ -597,9 +601,9 @@
}
}); // find all
contextHitsCalculated = true;
- time = System.currentTimeMillis() - time;
if (log.isDebugEnabled())
{
+ time = System.currentTimeMillis() - time;
log.debug("Collected {} context hits in {} ms for {}", new Object[]{
new Integer(contextHits.cardinality()), new Long(time), DescendantSelfAxisQuery.this});
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DocOrderScoreNodeIterator.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DocOrderScoreNodeIterator.java 2011-07-05 14:46:12 UTC (rev 4601)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DocOrderScoreNodeIterator.java 2011-07-05 15:13:59 UTC (rev 4602)
@@ -172,7 +172,11 @@
{
return;
}
- long time = System.currentTimeMillis();
+ long time = 0;
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis();
+ }
ScoreNode[][] nodes = (ScoreNode[][])scoreNodes.toArray(new ScoreNode[scoreNodes.size()][]);
final Set<String> invalidIDs = new HashSet<String>(2);
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java 2011-07-05 14:46:12 UTC (rev 4601)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java 2011-07-05 15:13:59 UTC (rev 4602)
@@ -56,11 +56,11 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Queue;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
-import java.util.Map.Entry;
import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.LinkedBlockingQueue;
@@ -1153,7 +1153,11 @@
if (handler.isInitializeHierarchyCache())
{
// force initializing of caches
- long time = System.currentTimeMillis();
+ long time = 0;
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis();
+ }
SecurityHelper.doPrivilegedIOExceptionAction(new PrivilegedExceptionAction<Object>()
{
public Object run() throws Exception
@@ -1162,8 +1166,11 @@
return null;
}
});
- time = System.currentTimeMillis() - time;
- log.debug("hierarchy cache initialized in {} ms", new Long(time));
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis() - time;
+ log.debug("hierarchy cache initialized in {} ms", new Long(time));
+ }
}
synchronized (this)
@@ -1754,7 +1761,11 @@
if (volatileIndex.getNumDocuments() > 0)
{
- long time = System.currentTimeMillis();
+ long time = 0;
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis();
+ }
// create index
CreateIndex create = new CreateIndex(getTransactionId(), null);
executeAndLog(create);
@@ -1769,8 +1780,11 @@
// create new volatile index
resetVolatileIndex();
- time = System.currentTimeMillis() - time;
- log.debug("Committed in-memory index in " + time + "ms.");
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis() - time;
+ log.debug("Committed in-memory index in " + time + "ms.");
+ }
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/QueryResultImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/QueryResultImpl.java 2011-07-05 14:46:12 UTC (rev 4601)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/QueryResultImpl.java 2011-07-05 15:13:59 UTC (rev 4602)
@@ -308,9 +308,16 @@
MultiColumnQueryHits result = null;
try
{
- long time = System.currentTimeMillis();
+ long time = 0;
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis();
+ }
result = executeQuery(maxResultSize);
- log.debug("query executed in {} ms", new Long(System.currentTimeMillis() - time));
+ if (log.isDebugEnabled())
+ {
+ log.debug("query executed in {} ms", new Long(System.currentTimeMillis() - time));
+ }
// set selector names
selectorNames = result.getSelectorNames();
@@ -325,9 +332,15 @@
result.skip(start);
}
- time = System.currentTimeMillis();
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis();
+ }
collectScoreNodes(result, resultNodes, maxResultSize);
- log.debug("retrieved ScoreNodes in {} ms", new Long(System.currentTimeMillis() - time));
+ if (log.isDebugEnabled())
+ {
+ log.debug("retrieved ScoreNodes in {} ms", new Long(System.currentTimeMillis() - time));
+ }
// update numResults
numResults = result.getSize();
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/RowIteratorImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/RowIteratorImpl.java 2011-07-05 14:46:12 UTC (rev 4601)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/RowIteratorImpl.java 2011-07-05 15:13:59 UTC (rev 4602)
@@ -781,11 +781,18 @@
}
try
{
- long time = System.currentTimeMillis();
+ long time = 0;
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis();
+ }
String excerpt = excerptProvider.getExcerpt(id, 3, 150);
-
- time = System.currentTimeMillis() - time;
- log.debug("Created excerpt in {} ms.", new Long(time));
+
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis() - time;
+ log.debug("Created excerpt in {} ms.", new Long(time));
+ }
if (excerpt != null)
{
return valueFactory.createValue(excerpt);
@@ -815,10 +822,17 @@
HighlightingExcerptProvider hep = (HighlightingExcerptProvider)excerptProvider;
try
{
- long time = System.currentTimeMillis();
+ long time = 0;
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis();
+ }
text = hep.highlight(text);
- time = System.currentTimeMillis() - time;
- log.debug("Highlighted text in {} ms.", new Long(time));
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis() - time;
+ log.debug("Highlighted text in {} ms.", new Long(time));
+ }
return valueFactory.createValue(text);
}
catch (IOException e)
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java 2011-07-05 14:46:12 UTC (rev 4601)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java 2011-07-05 15:13:59 UTC (rev 4602)
@@ -1881,7 +1881,11 @@
{
return;
}
- long time = System.currentTimeMillis();
+ long time = 0;
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis();
+ }
int found = SecurityHelper.doPrivilegedAction(new PrivilegedAction<Integer>()
{
public Integer run()
@@ -1937,8 +1941,11 @@
return found;
}
});
- time = System.currentTimeMillis() - time;
- log.debug("Retrieved {} aggregate roots in {} ms.", new Integer(found), new Long(time));
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis() - time;
+ log.debug("Retrieved {} aggregate roots in {} ms.", new Integer(found), new Long(time));
+ }
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2011-07-05 14:46:12 UTC (rev 4601)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2011-07-05 15:13:59 UTC (rev 4602)
@@ -517,8 +517,11 @@
// save state
if (itemState.isPersisted())
{
- long start = System.currentTimeMillis();
-
+ long start = 0;
+ if (LOG.isDebugEnabled())
+ {
+ start = System.currentTimeMillis();
+ }
ItemData data = itemState.getData();
WorkspaceStorageConnection conn;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/indexing/JdbcNodeDataIndexingIterator.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/indexing/JdbcNodeDataIndexingIterator.java 2011-07-05 14:46:12 UTC (rev 4601)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/indexing/JdbcNodeDataIndexingIterator.java 2011-07-05 15:13:59 UTC (rev 4602)
@@ -115,7 +115,11 @@
currentLastNodeId = lastNodeId.get();
currentPage = page.incrementAndGet();
}
- long time = System.currentTimeMillis();
+ long time = 0;
+ if (PropertyManager.isDevelopping())
+ {
+ time = System.currentTimeMillis();
+ }
List<NodeDataIndexing> result = conn.getNodesAndProperties(currentLastNodeId, currentOffset, pageSize);
if (PropertyManager.isDevelopping())
{
More information about the exo-jcr-commits
mailing list