In SLING-3285 there was an issue reported and supposably fixed related to many short-living sessions. I want to discuss here what the real problem is related to having so many short-living sessions
The open questions are: 1) Is creating a short-living session expensive? 2) Are closed sessions a problem within the Jackrabbit code (do closed (but not yet garbage collected) sessions impose any overhead in the JCR)? 3) Is the problem that those session objects with a finalizer cannot be released fast enough (because the JVM doesn’t trigger the finalizer methods fast enough as described in http://www.fasterj.com/articles/finalizer1.shtml) The general question is: Under which circumstances is it worth to cache a session (for a single thread) instead of just creating new ones and close them directly afterwards? Thanks, Konrad
