最近做性能測試,使用jprofile + microsoft web stress tool 測tomcat上的網頁.
做了個網頁例子,和.net對比速度,發現速度比不過.net
用jprofile 跟蹤多并發情況,發現在
bean:write 在寫整數和日期類型時,會找格式,并且從properties中找不同語言版本的格式.于是會訪問
WriteTag.retrieveFormatString
TagUtils.getInstance().message
PropertyMessageResource.getMessage(Locale locale, String key)
PropertyMessageResource.getMessage(Locale locale, String key) 中有個synchronized 塊,這里導致了代碼的等待時間過長.
文章來源:
http://stocknewbie.bokee.com/viewdiary.15201750.html
posted on 2009-05-01 10:52
huohuo 閱讀(157)
評論(0) 編輯 收藏