Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-864

poor performance @Inject + Interceptor

    Details

      Description

      I did some performance test using Weld Interceptors.
      I compared beans injected @Inject and @EJB. Beans had the same logic.
      Here are my results

      METHOD_INVOKED_COUNT=100000
      This took time: 48872ms [@EJB Class EJB-Interceptor]
      This took time: 49133ms [@EJB Method EJB Interceptor]
      This took time: 48939ms [@EJB Class Method-Interceptor]
      This took time: 49115ms [@EJB Method Weld-Interceptor]
      This took time: 48812ms [@EJB No Interceptor]
      This took time: 4619ms [@Inject No Interceptor]
      This took time: 201270ms [@Inject Class Weld-Interceptor]
      This took time: 203329ms [@Inject Method Weld-Interceptor]
      This took time: 34ms [POJO]

      As you can see @Inject + Interceptor have poor performance.

      EJB Bean -> @Stateless
      Weld Bean ->@SessionScoped (2 instances was created)

      If you need source code for this test please inform me

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                swd847 Stuart Douglas
                Reporter:
                wojtek9 wojtek k
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: