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

BasicCapability should take advantage of the effective immutability of capabilities.

    XMLWordPrintableJSON

Details

    Description

      Currently, when given an already existing Capability at construction, BasicCapability will make a copy of the attributes and directives. This is not really necessary since a properly implemented Capability will be effectively immutable as required by the OSGi API.

      Profiling showed that BasicCapability(Capability, Resource) was taking up 4.6%, or 1550 ms, of the total time. After the optimization, this no longer registered with a sampling time of 50 ms.

      BasicCapability(Capability, Resource) will now simply reuse the already existing, and effectively immutable, attribute and directive maps of the provided capability.

      Attachments

        1. ManyFeaturesWithSharedBundlesTest.java
          9 kB
          John Ross
        2. BasicCapability-Screenshot-Java Monitor.png
          337 kB
          John Ross
        3. BasicCapability-before.cpu
          72 kB
          John Ross
        4. BasicCapability-after.cpu
          85 kB
          John Ross

        Issue Links

          Activity

            People

              jwross@us.ibm.com John Ross
              jwross@us.ibm.com John Ross
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: