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

John Ross commented on ARIES-1565:
----------------------------------

Exploring the existing code suggests to me that the performance degradation is 
occurring because the temp ZIP file is continually closed and reopened as each 
entry is obtained. This occurs in ZipDirectory.getEntry(String) because the 
cache is null. So there already appears to be an existing way to overcome this 
issue. It's simply not being used. Instead of an InputStreamClosableDirectory, 
I think we should have FileSystemImpl.getFSRoot(InputStream) return something 
that combines the behavior of both InputStreamClosableDirectory (i.e. delete 
the temp file) and ZipCloseableDirectory (i.e. maintain a cache to prevent the 
reopening of the ZIP file). This should result in comparable performance 
benefits with a smaller code change footprint.

> Performance Improvement: unpack subsystem artifacts to tmp folder to avoid 
> directly reading from zip archive
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: ARIES-1565
>                 URL: https://issues.apache.org/jira/browse/ARIES-1565
>             Project: Aries
>          Issue Type: Improvement
>          Components: Subsystem, Util
>    Affects Versions: subsystem-2.0.8, util-1.1.2
>            Reporter: Wouter Bancken
>
> h4. Description
> Aries copies ESA archives to a temporary zip file during the installation 
> phase. Afterwards, bundles are read directly from this temporary zip which 
> has a large impact on the startup performance of Aries applications. By 
> unpacking the esa artifact into the temporary folder it is unpacked only 
> once. Subsequent reads for the bundles (jars) can be read directly from the 
> folder. 
> h4. Pull request
> https://github.com/apache/aries/compare/subsystem-2.0.x...WouterBanckenACA:io_performance_optimalisation?expand=1
> h4. Mailinglist
> http://mail-archives.apache.org/mod_mbox/aries-user/201606.mbox/%3CCAL5nZgTq5FxDvURJbzcEZ9YHx6vTs3HAOuFYDYA3ec9OZbmwjA%40mail.gmail.com%3E



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to