On 11/12/14 09:17 , Felix Meschberger wrote:
Hi
I have created a patch to improve the Service Access time. With this patch
applied I measure 4-5 times faster access to the service registry in our
application which in general access services simply by its name and almost
never uses a filter.
I expect that this patch also significantly improves service access if both a
filter and a service name is supplied. I expect no change if no service name is
supplied, though, since then the complete service registry has to be searched.
See issue FELIX-4692.
It would be great if this patch could be quickly reviewed before I actually
apply it.
I commented on the bug.
I don't see any issue with the patch per se, but I'd be interested in
knowing where in the execution path for find a service by objectClass we
are seeing overhead.
For the most part, it looks like this should just create an already
parsed filter call CapSet.match() which would internally call another
match(), where we would hit the index and return the result.
It seems like the only overhead besides creating the parsed simple
filter is a a couple method calls and some conditionals. Would it make a
difference if we simply checked for the special case of an objectClass
filter immediately rather than making it the else? Seems hard to believe
it would, but you never know.
-> richard
Thanks
Felix
[1] https://issues.apache.org/jira/browse/FELIX-4692