セレロン466のサーバにインストールしたところ、 「整形ルール」ページの処理に2秒かかっていたので、 少しソースを見てみました。 あれこれいじったのですが、 中でも以下の変更は大きく、2割程度速くなりました。 よく呼ばれる関数でコピーが頻繁に起こっていたのでしょう。 検討の上、問題がなければ使ってください。 よろしくお願いします。
diff -c pukiwiki/html.php /var/www/virtual_host/pukiwiki/html.php *** pukiwiki/html.php Fri Aug 8 16:27:33 2003 --- /var/www/virtual_host/pukiwiki/html.php Wed Sep 24 04:59:26 2003 *************** *** 265,278 **** // ユーザ定義ルール(ソースは置換せずコンバート) function make_line_rules($str) { ! global $line_rules; ! ! foreach($line_rules as $rule => $replace) ! { ! $str = preg_replace("/$rule/",$replace,$str); } ! ! return $str; } // HTMLタグを取り除く --- 265,280 ---- // ユーザ定義ルール(ソースは置換せずコンバート) function make_line_rules($str) { ! static $line_pattern="", $line_replacement; ! ! if ($line_pattern == "") { ! global $line_rules; ! foreach($line_rules as $rule => $replace) { ! $line_pattern[]="/$rule/"; ! $line_replacement[]=$replace; ! } } ! return preg_replace($line_pattern,$line_replacement,$str); } // HTMLタグを取り除く