2 Replies Latest reply on Jan 4, 2006 8:38 AM by stembol

    Lazy Loading

    prescott

      Hi,

      I am experiencing performance problems with jBPM/Hibernate under heavy loads (100 concurrent requests accessing 100 process instances). I end up with out of memory errors.

      I suspect 2 things - lazy loading or 2nd level caching. For now, I wish to investigate lazy loading.

      in this post, http://www.jboss.com/index.html?module=bb&op=viewtopic&t=68807 tom says that we can't do lazy loading because of some reason which I can't really understand (yet).

      In this post http://www.jboss.com/index.html?module=bb&op=viewtopic&t=72897 someone actually changed everything to lazy loading and reported huge performance gains.

      Anyone care to share on possible side-effects and reasons that jBPM came with default lazy=false?

      As many pple rightly pointed out, using customised queries for huge recordsets may be more suited, nonetheless I need to seek some assurance that jBPM is robust enough without me having to rewrite all my queries.

      Thanks for the attention. Appreciate any comments.

        • 1. Re: Lazy Loading
          koen.aers

          In the most recent versions of jBPM, lazy loading is enabled by default. The issue mentioned in the other thread was removed by a workaround.

          Regards,
          Koen

          • 2. Re: Lazy Loading
            stembol

            Yes lazy loading is enabled by default. And this can be a serious problem if you retrieve a list of n objects and then iterate over it. The resulting number of select statements is n+1.

            I solved my performance problems by using customised queries. One per page in the web interface.