tuning full production of content
authorrk <rk>
Mon, 18 Feb 2002 10:51:10 +0000 (10:51 +0000)
committerrk <rk>
Mon, 18 Feb 2002 10:51:10 +0000 (10:51 +0000)
dbscripts/create_pg.sql
source/mir/misc/HTMLTemplateProcessor.java
source/mircoders/producer/Producer.java
source/mircoders/producer/ProducerContent.java

index f53b328..997dfcd 100755 (executable)
@@ -676,3 +676,21 @@ CREATE UNIQUE INDEX "idx_video_id" on "audio" using btree ( "id" "int4_ops" );
 
 CREATE  INDEX "idx_video_is_published_produced" on "video" using btree ( "is_published" "bool_ops", "is_produced" "bool_ops" );
 
+
+--
+-- TOC Entry ID 37 (OID 520246)
+--
+-- Name: "idx_content_is_published" Type: INDEX Owner: postgres
+--
+
+CREATE  INDEX "idx_content_is_published" on "content" using btree ( "is_published" "bool_ops" );
+
+--
+-- TOC Entry ID 47 (OID 465036)
+--
+-- Name: "idx_comment_tomedia_ispublished" Type: INDEX Owner: postgres
+--
+
+CREATE  INDEX "idx_comment_tomedia_ispublished" on "comment" using btree ( "to_media" "int4_ops", "is_published" "bool_ops" );
+
+
index f6e981f..1abaae5 100755 (executable)
@@ -38,7 +38,7 @@ public final class HTMLTemplateProcessor {
   // init
 
   static {
-
+    /** @todo either in the above block or here :) //rk */
     templateDir = MirConfig.getPropWithHome("HTMLTemplateProcessor.Dir");
     templateCache = new FileTemplateCache(templateDir);
     templateCache.setLoadingPolicy(templateCache.LOAD_ON_DEMAND);
@@ -52,7 +52,7 @@ public final class HTMLTemplateProcessor {
     // nadir evironment. from my point of coding, this needs an urgent
     // fixxx.
     // yeah, from my point too - tob.
-       //actionRoot = docRoot + "/servlet/" + MirConfig.getProp("ServletName");
+         //actionRoot = docRoot + "/servlet/" + MirConfig.getProp("ServletName");
     //actionRoot = docRoot + "/servlet/NadirAktuell";
 
     actionRoot = docRoot + "/servlet/Mir";
index 529a956..50fc258 100755 (executable)
@@ -14,10 +14,12 @@ import mircoders.storage.*;
 
 abstract public class Producer {
 
-  protected static String producerDocRoot = MirConfig.getProp("Producer.DocRoot");
-  protected static String producerStorageRoot = MirConfig.getProp("Producer.StorageRoot");
-  protected static String producerProductionHost = MirConfig.getProp("Producer.ProductionHost");
-  protected static String producerOpenAction = MirConfig.getProp("Producer.OpenAction");;
+  protected static String   producerDocRoot = MirConfig.getProp("Producer.DocRoot");
+  protected static String   producerStorageRoot = MirConfig.getProp("Producer.StorageRoot");
+  protected static String   producerProductionHost = MirConfig.getProp("Producer.ProductionHost");
+  protected static String   producerOpenAction = MirConfig.getProp("Producer.OpenAction");;
+  protected static String   actionRoot = null;
+
   protected static Logfile theLog = Logfile.getInstance(MirConfig.getProp("Home") + "/" + MirConfig.getProp("Producer.Logfile"));
   protected static ModuleTopics         topicsModule;
   protected static ModuleLinksImcs      linksImcsModule;
@@ -37,6 +39,8 @@ abstract public class Producer {
       featureModule = new ModuleFeature(DatabaseFeature.getInstance());
       imageModule = new ModuleImages(DatabaseImages.getInstance());
       uploadedMediaModule = new ModuleUploadedMedia(DatabaseImages.getInstance());
+      /** @todo same as in HTMLTemplateProcessor, this should be dynamically set */
+      actionRoot = producerDocRoot + "/servlet/Mir";
     }
     catch(StorageObjectException e)
     {
index fd8548c..21b025e 100755 (executable)
@@ -118,10 +118,12 @@ public class ProducerContent extends Producer {
       }//for
     }
     // timing and message to browser
-    logHTML(htmlout, "Producer.Content finished producing " +
-            (System.currentTimeMillis() - startTime) + " ms. ("+ pageCount+" Pages)");
+    long overall = System.currentTimeMillis() - startTime;
+    long ppm = pageCount / (overall/60000);
+    logHTML(htmlout, "Producer.Content finished producing: " +
+            overall + " ms for "+ pageCount+" Pages = " +ppm + " pages/min");
+    logHTML(htmlout, "Back to <a href=\""+actionRoot+"\">Admin-Startage</a>");
 
-    /** @todo here we should have a link back to admin logged */
     /** @todo why no syncing here? */
 
   }