felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-5217) Fileinstall is handling removal of many files inefficiently
Date Wed, 16 Mar 2016 08:03:33 GMT

    [ https://issues.apache.org/jira/browse/FELIX-5217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15196973#comment-15196973

ASF GitHub Bot commented on FELIX-5217:

GitHub user CodingFabian opened a pull request:


    [FELIX-5217] fileinstall: Improve WatcherScanner performance

    note that the other option is to call addAll before the loop, but because the return value
is ignored anyway, it is slightly more efficient to do this in the loop.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/CodingFabian/felix FELIX-5217

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #58
commit f324e9ea13f265d418131cfdce99d8d9315f7991
Author: Fabian Lange <lange.fabian@gmail.com>
Date:   2016-03-16T07:59:26Z

    [FELIX-5217] fileinstall: Improve WatcherScanner performance


> Fileinstall is handling removal of many files inefficiently
> -----------------------------------------------------------
>                 Key: FELIX-5217
>                 URL: https://issues.apache.org/jira/browse/FELIX-5217
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>            Reporter: Fabian Lange
> I am currently debugging a performance issue with file install.
> The thread is very hot on:
> java.util.HashMap.hash(java.lang.Object)
> java.util.HashMap.put(java.lang.Object, java.lang.Object)
> java.util.HashSet.add(java.lang.Object)
> java.util.AbstractCollection.addAll(java.util.Collection) (line: 344)
> org.apache.felix.fileinstall.internal.WatcherScanner.scan(boolean) (line: 100)
> org.apache.felix.fileinstall.internal.DirectoryWatcher.run() (line: 302)
> What I see in WatcherScanner, is that it potentially adds the same elements over and
over again.
> While I am sure that this is not the root cause, I suggest to change the method to avoid
this. (submitting pr in a second)

This message was sent by Atlassian JIRA

View raw message