You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Johannes Edmeier (Jira)" <ji...@apache.org> on 2022/05/13 12:21:00 UTC

[jira] [Updated] (FELIX-6529) Improve memory usage ManifestParser using String deduplication

     [ https://issues.apache.org/jira/browse/FELIX-6529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johannes Edmeier updated FELIX-6529:
------------------------------------
    Description: 
In my heap dump I've seen a lot of duplicate Strings produced by the ManifestParser.
It creates a lot of equal strings for the keys in the manifest but doesn't deduplicate them and they're hold forever producing a lot on retained heap.

I've patched the ManifestParser to deduplicate just the keys and could save ~8 Megs of heap.

Total usage before: 38MB after: 30MB

Duplicated Strings before:
!image-2022-05-13-14-16-39-509.png|width=658,height=203!
Duplicated Strings after:
!image-2022-05-13-14-17-55-965.png|width=793,height=200!

See patch attached.

  was:
In my heap dump I've seen a lot of duplicate Strings produced by the ManifestParser.
It creates a lot of equal strings for the keys in the manifest but doesn't deduplicate them and they're hold forever producing a lot on retained heap.

I've patched the ManifestParser to deduplicate just the keys and could save ~8 Megs of heap.

Total usage before: 38MB after: 30MB

Duplicated Strings before:
!image-2022-05-13-14-16-39-509.png!
Duplicated Strings after:
!image-2022-05-13-14-17-55-965.png!


See patch attached.


> Improve memory usage ManifestParser using String deduplication
> --------------------------------------------------------------
>
>                 Key: FELIX-6529
>                 URL: https://issues.apache.org/jira/browse/FELIX-6529
>             Project: Felix
>          Issue Type: Improvement
>            Reporter: Johannes Edmeier
>            Priority: Major
>         Attachments: ManifestParser.patch, image-2022-05-13-14-16-39-509.png, image-2022-05-13-14-17-55-965.png
>
>
> In my heap dump I've seen a lot of duplicate Strings produced by the ManifestParser.
> It creates a lot of equal strings for the keys in the manifest but doesn't deduplicate them and they're hold forever producing a lot on retained heap.
> I've patched the ManifestParser to deduplicate just the keys and could save ~8 Megs of heap.
> Total usage before: 38MB after: 30MB
> Duplicated Strings before:
> !image-2022-05-13-14-16-39-509.png|width=658,height=203!
> Duplicated Strings after:
> !image-2022-05-13-14-17-55-965.png|width=793,height=200!
> See patch attached.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)