かずひこです。
erb のスキャン/パースを高速化するライブラリ、erbscan がインストールされ
ていれば、それを使うように、tdiary.rb を変更してコミットします。
* http://raa.ruby-lang.org/list.rhtml?name=erbscan
○変更前
begin
require 'erb'
ERbLight = ERB
rescue LoadError
require 'erb/erbl'
end
○変更後
begin
require 'erb_fast'
ERbLight = ERB
rescue LoadError
begin
require 'erb'
ERbLight = ERB
rescue LoadError
require 'erb/erbl'
end
end
なお、すでに第二 tDiary.Net で 4 ヵ月ほど erbscan を用いて運用しています
が、secure の true/false、mod_ruby の on/off にかかわらず問題なく動いて
おります。
かつて比較したときの記録はこんな感じです。
○ erb 使用時
(w/o cache) (w/ cache)
real 0m4.309s real 0m1.352s
user 0m2.086s user 0m0.615s
sys 0m0.064s sys 0m0.056s
○ erbscan 使用時
(w/o cache) (w/ cache)
real 0m1.529s real 0m0.483s
user 0m1.452s user 0m0.440s
sys 0m0.050s sys 0m0.036s
お気づきの点などがあればお知らせください。
--
かずひこ <http://wiki.fdiary.net/kazuhiko/>
★シャア「名字が付いてない」
☆一兵卒「あんなの飾りです。偉い人にはそれが分からんのです」
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
tDiary-devel mailing list
tDiary-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tdiary-devel