You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Jürgen Weber (JIRA)" <ji...@apache.org> on 2012/09/19 13:18:07 UTC

[jira] [Commented] (FELIX-3635) Unnecessary processing in DirectoryWatcher

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

Jürgen Weber commented on FELIX-3635:
-------------------------------------

If run on JRE 7+ better use the Watch Service API instead of polling the directory in a thread:
https://blogs.oracle.com/thejavatutorials/entry/watching_a_directory_for_changes
                
> Unnecessary processing in DirectoryWatcher
> ------------------------------------------
>
>                 Key: FELIX-3635
>                 URL: https://issues.apache.org/jira/browse/FELIX-3635
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-3.2.4
>            Reporter: Jarek Gawor
>            Assignee: Guillaume Nodet
>             Fix For: fileinstall-3.2.6
>
>         Attachments: FELIX-3635.patch
>
>
> When a DirectoryWatcher is setup to only watch configuration files (e.g. *.cfg), on each scan findBundlesWithOptionalPackagesToRefresh() is called. Since only configuration can change - no bundles, there is no need to call findBundlesWithOptionalPackagesToRefresh(). And the findBundlesWithOptionalPackagesToRefresh() can be expensive since it goes through all bundles in the framework looking for optional imports that can be now satisfied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira