Felix
  1. Felix
  2. FELIX-2721

[Framework] Implement custom manifest parser and avoid JarFile

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: framework-3.0.6
    • Fix Version/s: framework-3.0.7
    • Component/s: Framework
    • Labels:
      None

      Description

      In previous performance tuning work, I noticed that JarFile consumes a lot of memory, particularly due to the use of JarFile.getManifest(). This caches the manifest, perhaps the entire manifest, which is unnecessary for OSGi since we only use the main attributes. At the time I wasn't trying to address memory consumption, but speed and this didn't appear to improve it. However, now I have received reports of memory consumption issues in the field from people trying to use the Felix framework on embedded devices.

      After having sent a patch framework with custom manifest parsing, I have reports of considerable decreases in memory consumption. I think it makes sense to make this change. To avoid indirectly reading the manifest, we will need to avoid using JarFile altogether, since it will implicitly read the manifest and cache it during some operations.

        Activity

        Richard S. Hall made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Hide
        Richard S. Hall added a comment -

        Karl committed finishing touches on this.

        Show
        Richard S. Hall added a comment - Karl committed finishing touches on this.
        root committed 1052940 (1 file)
        Reviews: none

        Add some comments to the new manifest parser (FELIX-2721).

        Richard S. Hall committed 1052398 (1 file)
        Reviews: none

        Another manifest parser from Karl; looks a little faster. (FELIX-2721)

        Richard S. Hall committed 1052072 (1 file)
        Richard S. Hall made changes -
        Component/s Framework [ 12310352 ]
        Richard S. Hall made changes -
        Assignee Richard S. Hall [ rickhall ]
        Hide
        Richard S. Hall added a comment -

        I've committed an initial patch for this, but I am leaving it open for now in case we think of any other optimizations.

        Show
        Richard S. Hall added a comment - I've committed an initial patch for this, but I am leaving it open for now in case we think of any other optimizations.
        Richard S. Hall made changes -
        Field Original Value New Value
        Fix Version/s framework-3.0.7 [ 12316017 ]
        Fix Version/s framework-3.2.0 [ 12315053 ]
        Richard S. Hall created issue -

          People

          • Assignee:
            Richard S. Hall
            Reporter:
            Richard S. Hall
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development