From: rk Date: Mon, 18 Feb 2002 10:51:10 +0000 (+0000) Subject: tuning full production of content X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=817b8be9ae7d4a16608ed2ea4a228bff16594baa;p=mir.git tuning full production of content --- diff --git a/dbscripts/create_pg.sql b/dbscripts/create_pg.sql index f53b3280..997dfcd3 100755 --- a/dbscripts/create_pg.sql +++ b/dbscripts/create_pg.sql @@ -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" ); + + diff --git a/source/mir/misc/HTMLTemplateProcessor.java b/source/mir/misc/HTMLTemplateProcessor.java index f6e981f6..1abaae5d 100755 --- a/source/mir/misc/HTMLTemplateProcessor.java +++ b/source/mir/misc/HTMLTemplateProcessor.java @@ -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"; diff --git a/source/mircoders/producer/Producer.java b/source/mircoders/producer/Producer.java index 529a956c..50fc258f 100755 --- a/source/mircoders/producer/Producer.java +++ b/source/mircoders/producer/Producer.java @@ -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) { diff --git a/source/mircoders/producer/ProducerContent.java b/source/mircoders/producer/ProducerContent.java index fd8548c7..21b025ea 100755 --- a/source/mircoders/producer/ProducerContent.java +++ b/source/mircoders/producer/ProducerContent.java @@ -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 Admin-Startage"); - /** @todo here we should have a link back to admin logged */ /** @todo why no syncing here? */ }