Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4426
Modified Files:
Tag: branch-smarty
index.php rss.php
Log Message:
* Performance improvements for Plugin API (only fetch authorids of plugins once)
* Make TrackExits plugin cacheable like the markup plugins
* Remove obsolete legacy code
Index: rss.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/rss.php,v
retrieving revision 1.28.2.7
retrieving revision 1.28.2.8
diff -u -d -r1.28.2.7 -r1.28.2.8
--- rss.php 12 Nov 2004 15:43:22 -0000 1.28.2.7
+++ rss.php 16 Nov 2004 14:55:18 -0000 1.28.2.8
@@ -89,7 +89,7 @@
// load each plugin to make some introspection
foreach ($plugins as $plugin_data) {
if (preg_match('|@serendipity_syndication_plugin|', $plugin_data['name'])) {
- $plugin =& serendipity_plugin_api::load_plugin($plugin_data['name']);
+ $plugin =& serendipity_plugin_api::load_plugin($plugin_data['name'], $plugin_data['authorid']);
$additional_fields = $plugin->generate_rss_fields($title, $description, $entries);
$fullFeed = $plugin->get_config('fullfeed', false);
break;
Index: index.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/index.php,v
retrieving revision 1.49.2.12
retrieving revision 1.49.2.13
diff -u -d -r1.49.2.12 -r1.49.2.13
--- index.php 12 Nov 2004 15:43:21 -0000 1.49.2.12
+++ index.php 16 Nov 2004 14:55:17 -0000 1.49.2.13
@@ -1,13 +1,17 @@
<?php # $Id$
-#apd_set_pprof_trace();
+$global_debug = true;
-function microtime_float() {
- list($usec, $sec) = explode(" ", microtime());
- return ((float)$usec + (float)$sec);
-}
+if ($global_debug) {
+ #apd_set_pprof_trace();
-$time_start = microtime_float();
+ function microtime_float() {
+ list($usec, $sec) = explode(" ", microtime());
+ return ((float)$usec + (float)$sec);
+ }
+
+ $time_start = microtime_float();
+}
// We need to set this to return a 200 since we use .htaccess ErrorDocument
// rules to handle archives.
@@ -229,8 +233,10 @@
}
$serendipity['smarty']->display(serendipity_getTemplateFile($serendipity['smarty_file'], 'serendipityPath'));
-/* TODO: Remove (hide) this debug */
-echo '<div id="s9y_debug" style="text-align: center; color: red; font-size: 10pt; font-weight: bold; padding: 10px">Page generated in '. round(microtime_float()-$time_start,6) .' seconds, '. sizeof(get_included_files()) .' files included</div>';
+if ($global_debug) {
+ /* TODO: Remove (hide) this debug */
+ echo '<div id="s9y_debug" style="text-align: center; color: red; font-size: 10pt; font-weight: bold; padding: 10px">Page generated in '. round(microtime_float()-$time_start,6) .' seconds, '. sizeof(get_included_files()) .' files included</div>';
+}
/* vim: set sts=4 ts=4 expandtab : */
?>
|