manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1636519 - in /manifoldcf/trunk: CHANGES.txt framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
Date Tue, 04 Nov 2014 09:04:55 GMT
Author: kwright
Date: Tue Nov  4 09:04:55 2014
New Revision: 1636519

URL: http://svn.apache.org/r1636519
Log:
Tentative fix for CONNECTORS-1093.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1636519&r1=1636518&r2=1636519&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Tue Nov  4 09:04:55 2014
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 2.0-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)
 

Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java?rev=1636519&r1=1636518&r2=1636519&view=diff
==============================================================================
--- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
(original)
+++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
Tue Nov  4 09:04:55 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.



Mime
View raw message