Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-5876

improve performance of TextFileCertificateLoginModule when many entries are in the "textfiledn.user " file

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.11.1
    • Fix Version/s: 5.12.0
    • Component/s: jaas, security
    • Labels:

      Description

      With a large number of entries ( 200,000 ) in the "org.apache.activemq.jaas.textfiledn.user" file the performance seemed to degrade.

      To demonstrate the performance difference;

      1) for 100 entries and calling initialize,login(),commit 10 times - Time taken is 73 miliseconds
      
      2) for 200,000 entries and calling initialize,login(),commit 10 times - Time taken is  5020 miliseconds
      
      

      Suggested improvements:

      • avoid loading the org.apache.activemq.jaas.textfiledn.user file each time - in PropertiesLoginModule.java, the file is only read when it changes, using the file modification time.
      • avoid iterating through the Properties object, using a Map instead to retrieve the userName

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gtully Gary Tully
                Reporter:
                gtully Gary Tully
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: