精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2007-10-10
如果你是用JDK 5.0或以上的版本,就可以直接得到这个性能的提升的好处了。 或者下载 Emory concurrent utilities backport 加到 CLASSPATH 中 http://dcl.mathcs.emory.edu/util/backport-util-concurrent/ 当然还要努力,越快越好啦。。。 引用 The upcoming Spring Framework version 2.5 will bring a 200% improvement for concurrent access over Spring 2.0.*. I used Crazy Bob's Semi Useless Benchmark ™ as a starting point. I fiddled with the code slightly to change the default behavior from "prototype" to "singleton", and I saw that spring 2.5 was faster than Guice for singletons. Here are some benchmarks (there is variability based on the runs) * Spring 2.0 vs. guice 1.0: o Prototype: Single thread: Spring is 50-150X slower. Concurrent: Spring is 50-150X slower. o Singleton: Single thread: Spring 3X slower - 2X faster. Concurrent: Spring is 5-10X slower * Spring 2.0.6 vs. guice 1.0: o Prototype: Single thread: Spring is ~10X slower. Concurrent: Spring is 5X slower. o Singleton: Single thread: Spring 2X slower - 2X faster. Concurrent: Spring:Guice ~2:3 * Spring 2.14m vs. guice 1.0: o Prototype: Single thread: Spring is 5-7X slower. Concurrent: Spring is 3-4X slower. o Singleton: Single thread: neck and neck. Concurrent: Spring is 1-1.5X faster * guice 1.0: o Prototype: Single thread vs. Concurrent: Concurrent might be a bit slower than single threaded o Singleton: Single thread vs. Concurrent: Concurrent is quite a bit faster than single threaded 详细请见这里 http://www.jroller.com/Solomon/entry/spring_2_5_perfomance_improvements 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2007-10-10
一直看好Spring,2.5期待中!!!!!!!!
|
|
返回顶楼 | |
发表时间:2007-10-11
YuLimin 写道 并发性能提升的原因之一是使用了 ConcurrentHashMap,原来的 Collections.synchronized(new HashMap()) 存在同步锁的性能瓶颈;
如果你是用JDK 5.0或以上的版本,就可以直接得到这个性能的提升的好处了。 或者下载 Emory concurrent utilities backport 加到 CLASSPATH 中 http://dcl.mathcs.emory.edu/util/backport-util-concurrent/ 当然还要努力,越快越好啦。。。 引用 The upcoming Spring Framework version 2.5 will bring a 200% improvement for concurrent access over Spring 2.0.*. I used Crazy Bob's Semi Useless Benchmark ™ as a starting point. I fiddled with the code slightly to change the default behavior from "prototype" to "singleton", and I saw that spring 2.5 was faster than Guice for singletons. Here are some benchmarks (there is variability based on the runs) * Spring 2.0 vs. guice 1.0: o Prototype: Single thread: Spring is 50-150X slower. Concurrent: Spring is 50-150X slower. o Singleton: Single thread: Spring 3X slower - 2X faster. Concurrent: Spring is 5-10X slower * Spring 2.0.6 vs. guice 1.0: o Prototype: Single thread: Spring is ~10X slower. Concurrent: Spring is 5X slower. o Singleton: Single thread: Spring 2X slower - 2X faster. Concurrent: Spring:Guice ~2:3 * Spring 2.14m vs. guice 1.0: o Prototype: Single thread: Spring is 5-7X slower. Concurrent: Spring is 3-4X slower. o Singleton: Single thread: neck and neck. Concurrent: Spring is 1-1.5X faster * guice 1.0: o Prototype: Single thread vs. Concurrent: Concurrent might be a bit slower than single threaded o Singleton: Single thread vs. Concurrent: Concurrent is quite a bit faster than single threaded 详细请见这里 http://www.jroller.com/Solomon/entry/spring_2_5_perfomance_improvements 通过新特性提升性能是可喜的,说明Spring并没有背包袱。 但是对于IoC容器来说,这个性能提升往往没什么实际意义……因为虽说是10x甚至100x的差距,但是实际的单次注入性能差距从时间消耗上来说非常小……对应用来说得不到什么实际好处。 我觉得学习Spring性能改进的方法可能对我们的应用比较有意义。 |
|
返回顶楼 | |
发表时间:2007-10-11
Spring2.5目前仍然没有开放下载吧!
|
|
返回顶楼 | |
发表时间:2007-10-11
版本号跳好快,一下2.5了,期待ing
|
|
返回顶楼 | |
发表时间:2007-10-12
版本跳的快,升级麻烦。
|
|
返回顶楼 | |
发表时间:2007-10-14
这个改进对于那些系统需要频繁而且大量进行IOC动作的系统来说是比较有意义的;而对于那些同一时刻总共不会超过1000个注入实例的系统来说,效果就不是很明显了。
Spring在IOC这个基础项目上的努力还是令人可喜的,它全面降低J2EE项目开发难度的事实正在得到不断巩固。 |
|
返回顶楼 | |
发表时间:2007-10-15
Spring 2.5 ……
果然是开源软件,升级有够快, 跟着链接的信息跟进去看Juergen大叔的博客,原来是2.1转过去的 但是公司还在用Spring-on-wls1.2.5 升级无望,只能看着众多新特性眼馋,不知道大家在实际项目中怎么用,我想用Spring1.2.8的应该不在少数吧? |
|
返回顶楼 | |
发表时间:2007-10-15
我们公司还在用1.2.3。。。
|
|
返回顶楼 | |
发表时间:2007-10-16
我们1.2.6
|
|
返回顶楼 | |