You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2022/07/18 13:07:00 UTC

[jira] [Commented] (SLING-11462) Reduce memory requirements if feature archives are not used

    [ https://issues.apache.org/jira/browse/SLING-11462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17567983#comment-17567983 ] 

Konrad Windszus commented on SLING-11462:
-----------------------------------------

We should use https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#copy(java.io.InputStream,%20java.nio.file.Path,%20java.nio.file.CopyOption...) instead. That is available since Java 7 and probably uses a properly sized buffer under the hood.

> Reduce memory requirements if feature archives are not used
> -----------------------------------------------------------
>
>                 Key: SLING-11462
>                 URL: https://issues.apache.org/jira/browse/SLING-11462
>             Project: Sling
>          Issue Type: Improvement
>          Components: Feature Model
>            Reporter: Robert Munteanu
>            Assignee: Robert Munteanu
>            Priority: Major
>             Fix For: Feature Model Launcher 1.2.2
>
>
> The Feature Launcher allocated a 256 MiB array unconditionally, see [1]. It is only used when feature model archives are read in.
> Its usefulness is questionable, but to prevent performance regressions I'd like to start with a change that allocates it only when feature model archives are used.
> [1]: https://github.com/apache/sling-org-apache-sling-feature-launcher/blob/36b7fe229780b06f81db0a97f2e8e86726a3158c/src/main/java/org/apache/sling/feature/launcher/impl/FeatureProcessor.java#L111



--
This message was sent by Atlassian Jira
(v8.20.10#820010)