因为对象的创建和销毁会耗费时间,将这些对象保存在处理过程中的内存中,这样避免频繁的创建和销毁。这样可以快速提高系统的性能。
但是本篇文章认为,这种In-process Cache反而是对应用性能是有害的。
http://www.theserverside.com/news/thread.tss?thread_id=19001
[该贴被admin于2008-10-17 16:46修改过]
但是本篇文章认为,这种In-process Cache反而是对应用性能是有害的。
http://www.theserverside.com/news/thread.tss?thread_id=19001
[该贴被admin于2008-10-17 16:46修改过]
Based on my personal opionion, unless you can caching piles of data, in process cache have very little impact on GC, cache is "non transient" memory, as long as it remain as a small portion of total memory, it has almost no negative effect on GC frequence, its impact on GC( full GC) duration are normally not significant.
On the other side, frequent serailziation due to bring in data from external cache will increase consumption of more transient memory, and that's a GC and performance killer.
any, once you know the artifacts, it's just a simple mathematic thing to figure out whether local or external cache it's good or not for your project.
Cheers
-Wanchun