I did a quick perf check using WebGrind, and found that we have a lot of unnecessary preg_matches() during MARC processing; this patch fixes that.

Testing this patch: performance goes up 5-6x during offline refreshing of 91 nodes (see attached screenshot)

Comments

janusman’s picture

Committed last patch.

janusman’s picture

StatusFileSize
new1.22 KB

DOH! Brown bag fix::

@@ -2164,7 +2165,7 @@
     return false;
   }
   foreach ($record as $element) {
-    if (strpos($tag_start, $element["tags"]) === 0) {
+    if (strpos($element["tags"], $tag_start) === 0) {
       $results[] = $element;
     }
   }

Committed this patch.

janusman’s picture

Status: Active » Closed (fixed)

Checked again: Performance increase is minimal... brown bag will remain on this developer's head for 3 days.

HOWEVER, there might be other areas to improve? =) Leaving open for those =)