[WordPress] 外掛分享: Faster Smilies

首頁外掛目錄 › Faster Smilies
全新外掛
安裝啟用
尚無評分
6267 天前
最後更新
問題解決
WordPress 2.5+ v1.0 上架:2009-01-15

內容簡介

當有評論的文章和頁面中,創建頁面中最耗時的部分就是將表情符號轉換為圖像的翻譯!

這在WordPress 2.8-bleeding-edge中已經得到修復,但如果你沒有使用,(在生產中你可能不應該,但!)這個外掛程序仍然可以加速處理速度。

它替換了smilies_init為一個新的,構造了一個更有效的常規表達式,顯著增加了處理表情符號更快的效率。

注意:它使用"e"修飾符來替換preg_replace來避免修補任何核心文件。但不是所有主機都允許這樣做。

性能

一個在WordPress 2.7中的25個評論的頁面平均創建速度快了28%!

在沒有插件的2.6.5版本上,對具有403個評論的頁面上濾鏡的性能概況如下:

總共用時: 7.052秒,過濾/操作:5.856秒(83%),數據庫:0.033秒(0.5%)
1. convert_smilies(調用次數:403,總用時:3.911秒(55.5%))
...

帶有插件的概況如下:

總共用時:3.439秒,過濾/操作:2.174秒(63.2%),數據庫:0.036秒(1%)
...
4. convert_smilies(調用次數:403,總用時:0.357秒(10.4%))
...

速度提升了50%以上!

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Faster Smilies」→ 直接安裝(推薦)

原文外掛簡介

On posts and pages with comments the most timeconsuming part in page creation is translating the smilies to images!
This has now been fixed in WordPress 2.8-bleeding-edge, but if you are not using that (and in production you probably shouldn’t, yet!), this plugin gives you the speedup anyway.
It replace smilies_init with a new one that constructs a more efficient regular expression, resulting in 10 ggr faster handling of smilies replacement.
Note: it uses the ‘e’ modifier to preg_replace to avoid patching any core files. Not all hosts allow this.
Performance
A page with 25 comments on an otherwise empty WordPress 2.7 got created on average 28% faster!
Profile of filters on 2.6.5 without plugin on a page with 403 comments:
Total: 7.052s, Filters/Actions: 5.856s (83%), Db: 0.033s (0.5%)
1. convert_smilies (calls: 403, total time: 3.911s (55.5%))
...

Profile with plugin:
Total: 3.439s, Filters/Actions: 2.174s (63.2%), Db: 0.036s (1%)
...
4. convert_smilies (calls: 403, total time: 0.357s (10.4%))
...

More than 50% faster!

延伸相關外掛

文章
Filter
Apply Filters
Mastodon