Tag Archives: 性能调优

让Struts 2性能提升一个数量级的的5个步骤 [zz]

原文:http://dev.yingzhitech.com/2009/01/06/96 freemarker 升级为2.3.14 ognl 升级为 2.7.3(要附加javassis类库) 根包下增加freemarker.properties文件,内容为template_update_delay=60000 struts.xml增加<constant name=”struts.devMode” value=”false”/>和<constant name=”struts.freemarker.templatesCache” value=”true”/> 把struts.xml中的默认拦截器定义为basicStack: <package name="web" extends="tiles-default">     <default-interceptor-ref name="basicStack" /> </package> <package name=”web” extends=”tiles-default”> <default-interceptor-ref name=”basicStack” /> </package> 执行了这几步之后,网站性能从5 req/s提升至70 req/s,请求处理时间从22s/req缩减至2s/req! 参考连接: http://struts.apache.org/2.x/docs/performance-tuning.html http://www.blogjava.net/usherlight/archive/2008/07/01/211869.html http://www.blogjava.net/usherlight/archive/2008/07/12/214462.html http://www.blogjava.net/usherlight/archive/2008/09/02/226501.html

JFreeChart中的TimeSeries可能导致内存泄露

前段时间说到现在的项目里在用JFreeChart。昨天晚上走之前没把客户端关掉,今天中午到公司发现程序已经崩了,狂抛OutOfMemoryError。用NB的profiler跟了一下,发现是JFreeChart或者说是没有正确使用JFreeChart的TimeSeries导致的后果 TimeSeries有一个方法setMaximumItemAge: public void setMaximumItemAge(long periods) public void setMaximumItemAge(long periods) 该方法文档如下: Sets the number of time units in the ‘history’ for the series. This provides one mechanism for automatically dropping old data from the time series. For example, if a series contains daily data, you might set the history count to 30. Then, when you read more »

无觅相关文章插件,快速提升流量