Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-2721

[Framework] Implement custom manifest parser and avoid JarFile

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • framework-3.0.6
    • framework-3.0.7
    • Framework
    • 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.

      Attachments

        Activity

          People

            rickhall Richard S. Hall
            rickhall Richard S. Hall
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: