tjwatson commented on code in PR #486:
URL: https://github.com/apache/felix-dev/pull/486#discussion_r2933714600


##########
scr/src/main/java/org/apache/felix/scr/impl/ComponentRegistry.java:
##########
@@ -718,42 +716,44 @@ public Dictionary<String, Object> 
getServiceRegistrationProperties()
 
     public void setRegistration(final 
ServiceRegistration<ServiceComponentRuntime> reg)
     {
-        this.registration = reg;
+        long delay = m_configuration.serviceChangecountTimeout();
+        m_componentActor.scheduleWithFixedDelay(new 
UpdateChangeCountProperty(reg), delay, delay, TimeUnit.MILLISECONDS);

Review Comment:
   Is there a reason to have a small timeout?  I wanted performance tests with 
the original change.  I only got to doing that now and the current approach is 
expensive. It adds over 5% CPU time to initial startup. It would be nice ro see 
how expensive it really is to check the value of a long once every 5 seconds.
   
   We could consider an enhancement that cancels the repeating task after a set 
amount of retries.  Then reschedules as needed.  But we should not prematurely 
optimize with out performance numbers that prove a problem.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to