jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: jcr session creation takes 2 seconds
Date Thu, 22 Oct 2009 12:43:32 GMT
Hi,

On Thu, Oct 22, 2009 at 1:57 PM, Torgeir Veimo <torgeir@netenviron.com> wrote:
> I've started seeing lately that session creation takes up to two
> seconds. Am creating a new session on each http request at the moment,
> but from what I've been reading in the past, such creation should not
> be too demanding on the repository.

Correct, two seconds is definitely too much. A simple performance test
case I have can run thousands of login().logout() operations in a
second.

Are you using the TransientRepository class? Then it could be that the
entire repository gets started up when you run login(). You can avoid
that by either keeping one long-lived session open, or by switching to
using the RepositoryImpl class directly so you are in direct control
of when to shutdown() the repository.

BR,

Jukka Zitting

Mime
View raw message