1 Reply Latest reply on May 9, 2014 2:14 AM by swiderski.maciej

    Performance improvement for asynch task over synch task

    kanchan_garud

      Hi,

       

      I am evaluating the performance for aynch task and synch task. I observed that if I put work that takes less than a sec(because min jbe interval that can be set is 1 sec) for execution under execute method of workItemHandler, Synch task performs better than asynch.

      I want to know in which case we can see the performance improvement for aynch task over synch task ?

      Appreciate your time.

       

      Thanks in advance,

      Kanchan

        • 1. Re: Performance improvement for asynch task over synch task
          swiderski.maciej

          next version of jbpm will allow you to specify time unit to fine tune how often executor polls for the available jobs for execution. In all cases sync operations will perform better as there is no need to shift execution to a background thread (of any sort). Async operations can be done by using jbpm executor (and that's the recommended way) but if you have special requirements you can always use another one. Advantage of using executor is that is decouples the execution from the caller and allows it to scale better in clustered environment by not expecting the same machine will perform the work that requested it.

          If you feel performance is bad because you have tasks that executes in less than a second, then the question would be why you need to have it done in async way? Async is designed to carry over the work that is not suitable for sync execution which usually means it takes much more time to complete.

           

          HTH