kmansfield Posted April 8, 2009 Share Posted April 8, 2009 We are running a jasper server instance with many roles and it are running into performance problems when running the run report or schedule report flow. jasperserver-pro v 2.1.0.Can someone please tell me why the DetachedCriteria is being used. I'm thinking of removing this to increase performance. I think this is causing a couple of problems:1) I'm guessing DetachedCriteria disables lazy instantiation, thus when the hibernate class RepoUser via the UserAuthorityServiceImpl.getRepoUser(), it is very sluggish since it proactively loads (not lazy instantiation) all the roles 1 round trip query at a time. I fixed this bottleneck by changing the RepoUser.hbm.xml to changed lazy="true" to be batch-size="1000" and it works much, much faster, like 5x faster.2) I'm guessing that this doesn't use the hibernate cash and thus I'm seeing multiple loads of the same objects which obviously have not changed in the repository, for example the same RepoUser will be loaded several times as in (1) when creating input control wrappers.3) Also I'm seeing pretty bad performance in HibernateRepositoryServiceImpl.findByName which gets called in a loop via a hibernate filter, I'm not sure this is a problem caused by DetachedCriteria, but I'm still trying to figure out how to fix this and if anyone has any ideas, I would appreciate it.Keith Link to comment Share on other sites More sharing options...
kmansfield Posted April 9, 2009 Author Share Posted April 9, 2009 My current performance bottleneck is the query is (3) HibernateRepositoryServiceImpl.findByName and it is definitely querying redundantly with the same criteria it seems like hibernate session cache is not being invoked with the criteria. This coupled with the fact that the hibernate filter is looping one by one and returning redundant rows which each get queried upon. I guess I can try to implement my own cache to band aid the problem, but are there other ideas to fix the root problem that would be more appropriate? Link to comment Share on other sites More sharing options...
swood Posted May 4, 2009 Share Posted May 4, 2009 You are right - we have not tuned the use of the Hibernate 2nd level cache. In 3.5, we cached object permissions for longer, and achieved a speed improvement. We will look into your suggestions. Can you log a bug for these? ShermanJaspersoft Link to comment Share on other sites More sharing options...
kmansfield Posted May 5, 2009 Author Share Posted May 5, 2009 I oppened a support case several weeks ago for issue 3, #00008550, but am waiting on a response. Any work around to reduce the time would be greatly appreciated. I did implement my own caching, but it was marginal time savings since the loop is killing things. I opened also bugs for each item in the tracker: 0003921: Modify RepoUser hibernate config file to batch load 0003920: Modify Jasper to use hibernate caching to improve performance problems 0003922: HibernateRepositoryServiceImpl.findByName gets called in a hibernate loop and slows performance Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now