Author: kwright
Date: Tue Nov  4 09:06:11 2014
New Revision: 1636520

URL: http://svn.apache.org/r1636520
Log:
Pull up fix for CONNECTORS-1093 from trunk.

Modified:
    manifoldcf/branches/dev_1x/   (props changed)
    manifoldcf/branches/dev_1x/CHANGES.txt
    manifoldcf/branches/dev_1x/framework/   (props changed)
    
manifoldcf/branches/dev_1x/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java

Propchange: manifoldcf/branches/dev_1x/
------------------------------------------------------------------------------
  Merged /manifoldcf/trunk:r1636519

Modified: manifoldcf/branches/dev_1x/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/CHANGES.txt?rev=1636520&r1=1636519&r2=1636520&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/CHANGES.txt (original)
+++ manifoldcf/branches/dev_1x/CHANGES.txt Tue Nov  4 09:06:11 2014
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 1.8-dev =====================
 
+CONNECTORS-1093: Need to preload document priorities for reset
+of all priorities, for performance.
+(Karl Wright)
+
 CONNECTORS-1092: Error in log during load tests.
 (Karl Wright)
 

Propchange: manifoldcf/branches/dev_1x/framework/
------------------------------------------------------------------------------
  Merged /manifoldcf/trunk/framework:r1636519

Modified: 
manifoldcf/branches/dev_1x/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java?rev=1636520&r1=1636519&r2=1636520&view=diff
==============================================================================
--- 
manifoldcf/branches/dev_1x/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
 (original)
+++ 
manifoldcf/branches/dev_1x/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
 Tue Nov  4 09:06:11 2014
@@ -1078,8 +1078,8 @@ public class ManifoldCF extends org.apac
     IPriorityCalculator[] priorities = new IPriorityCalculator[descs.length];
 
     // Go through the documents and calculate the priorities
-    int i = 0;
-    while (i < descs.length)
+    rt.clearPreloadRequests();
+    for (int i = 0; i < descs.length; i++)
     {
       DocumentDescription dd = descs[i];
       IJobDescription job = jobDescriptionMap.get(dd.getJobID());
@@ -1111,16 +1111,16 @@ public class ManifoldCF extends org.apac
       {
         repositoryConnectorPool.release(connection,connector);
       }
-
-      priorities[i] = new PriorityCalculator(rt,connection,binNames);
-
-      i++;
+      PriorityCalculator p = new PriorityCalculator(rt,connection,binNames);
+      priorities[i] = p;
+      p.makePreloadRequest();
     }
-
+    rt.preloadBinValues();
+    
     // Now, write all the priorities we can.
     jobManager.writeDocumentPriorities(currentTime,descs,priorities);
 
-
+    rt.clearPreloadedValues();
   }
 
   /** Get the activities list for a given repository connection.


Reply via email to