Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-338

osgi:service JNDI damping performs like a one legged dog under an anesthetic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.1
    • 0.2
    • JNDI
    • None

    Description

      I updated some of my code to use the JNDI implementation of osgi:service which does the service damping and my application saw a 3x slowdown (i.e. it took 3 second to do something it used to take 1 seconds).

      It appears the problem is that every time a lookup is performed a new java.lang.reflect.Proxy class is generated and doing this over and over when the same service is looked up is expensive. Instead of doing this we can generate a proxy once per client BundleContext per service and cache it between lookups. The cache needs to be managed, so if the client goes away we clear the cache and if the service goes away we purge it too.

      I have written the code and shown that it improves performance so I'm raising this JIRA so I can integrate the performance fix.

      Attachments

        Activity

          People

            not Alasdair Nottingham
            not Alasdair Nottingham
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: