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

Carsten Ziegeler resolved FELIX-6399.
-------------------------------------
    Resolution: Fixed

Implemented in 
https://github.com/apache/felix-dev/commit/194d23e253cb5c34a793f1e46363e7785e9addc7
 by caching the result until the service component runtime updates its change 
count.
While this can cause a slight delay in detecting a changes, an event based 
mechanism is far better than constant polling
I've also improved logging with logging potential exceptions and non green 
status returned from a check

> Reduce resource consumption during component checks
> ---------------------------------------------------
>
>                 Key: FELIX-6399
>                 URL: https://issues.apache.org/jira/browse/FELIX-6399
>             Project: Felix
>          Issue Type: Improvement
>          Components: System Ready
>    Affects Versions: systemready-0.4.2
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>            Priority: Major
>             Fix For: systemready-0.4.3
>
>
> the components readycheck is each time (every 5 secs) iteration over all DS 
> components just to check for a few. The iteration includes access to the 
> service registry which (in Felix framework 6.x) has a lock
> There are two optimizations:
> - components check should only check for the configured ones instead of 
> iterating over all components just to find the ones interested in
> - the resultcan be cached until an event occurs (service changed event of the 
> SCR runtime as the runtime has a change count property to exactly avoid 
> polling)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to