3 Replies Latest reply on Nov 30, 2009 5:19 AM by Daniel Bevenius

    Performance: Extracting security credentials from requests

    Daniel Bevenius Master

      As part of the performance work that David and I are working on I've been looking into ways to improve the performance when we extract security credentials from different message and transport protocols.

      Currently we are using Smooks and the reason for that choice simply that was the quickest for me to implement.
      I've now looked at using Stax and also at SXC (http://sxc.codehaus.org/Home)

      I've taken one of the extractors which extract the Username element data and the Password elements data from a SOAP Security Header. The SOAP message is a String in this case and not a SOAPMessage object instance.

      Following are the result that I've gathered:

      Test: WSSecurityInfoExtractorUnitTest.extractUserPassSecurityInfo
      1ms 1969497ns
      1ms 1985770ns
      2ms 2154726ns
      2ms 2325567ns
      2ms 2807360ns
      3ms 3157355ns
      5ms 5156815ns
      6ms 6649339ns
      7ms 7066943ns
      11ms 11248229ns

      Test: WSSecurityInfoExtractorSXCUnitTest.extractUserPassSecurityInfo
      16ms 16576305ns
      18ms 18043196ns
      23ms 23826942ns
      24ms 24942720ns
      28ms 28823322ns
      31ms 31506149ns
      32ms 32187070ns
      45ms 45235491ns
      59ms 59891821ns
      93ms 93950116ns

      Test: WSSecurityInfoExtractorStaxUnitTest.extractUserPassSecurityInfo
      0ms 641808ns
      0ms 647256ns
      0ms 662552ns
      0ms 666883ns
      0ms 675334ns
      0ms 678756ns
      0ms 720663ns
      0ms 743293ns
      1ms 1771975ns
      11ms 11028217ns

      So I think Stax is the way to go here. If no one objects I'll create a Jira for this.