You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Lucas Galfaso (Created) (JIRA)" <ji...@apache.org> on 2011/11/06 01:24:51 UTC
[jira] [Created] (FELIX-3202) Add generic type information to
SimpleFilter
Add generic type information to SimpleFilter
--------------------------------------------
Key: FELIX-3202
URL: https://issues.apache.org/jira/browse/FELIX-3202
Project: Felix
Issue Type: Improvement
Components: Framework
Reporter: Lucas Galfaso
Priority: Minor
SimpleFilter does not have Java 5 generic type information and it is very hard to add this to the current implementation.
Devise a way to add generate type information to SimpleFilter while keeping in mind that this is a critical component and any performance degradation would slow down the entire framework
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3202) Add generic type information to
SimpleFilter
Posted by "Lucas Galfaso (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149239#comment-13149239 ]
Lucas Galfaso commented on FELIX-3202:
--------------------------------------
About (2) the current implementation makes the assumption that there will be no type conversion needed for the values that are indexed. This is not as generic as the filter matching, but given that the only values indexed are Strings (or array/collection of Strings) and the filter values, for the attributes indexed, are also Strings, then everything is good.
What I was trying to point out is that in the current implementation it is not possible to make an index on an attribute that it is possible that it is stored, at the filter level, using different classes (say the attribute BUNDLE_VERSION that can apper as Version and as String)
Solving this is a very hard problem that I am not trying to fix.
> Add generic type information to SimpleFilter
> --------------------------------------------
>
> Key: FELIX-3202
> URL: https://issues.apache.org/jira/browse/FELIX-3202
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: Lucas Galfaso
> Priority: Minor
> Attachments: felix_java5_filter.diff
>
>
> SimpleFilter does not have Java 5 generic type information and it is very hard to add this to the current implementation.
> Devise a way to add generate type information to SimpleFilter while keeping in mind that this is a critical component and any performance degradation would slow down the entire framework
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3202) Add generic type information to
SimpleFilter
Posted by "Richard S. Hall (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146070#comment-13146070 ]
Richard S. Hall commented on FELIX-3202:
----------------------------------------
(3) Java basically encourages people to create classes all over the place for listeners, tasks, etc. At the .java these classes are hidden and appear cost free since they are in the same source file, but once compiled (as you probably know) they are expanded out into tons of separate classes, resulting into major class loading storms when starting an application. Granted, the framework has already grown beyond what I am happy with since the spec continues to bloat, but I still worry about these issues. The framework is intended to run on everything from small devices to servers, so everything benefits if we can keep it tight. I'd be happier with patches that removed large pieces of unnecessary junk to make it smaller, rather than adding tons of stuff to make it more readable. Clearly, this is a losing battle over time (if not lost already) and there is tension because sometimes abstractions are useful even though they may bloat the implementation. It's a balancing act and there is no clear right or wrong answer, it just depends.
(4) I believe the numbers you are seeing, I questioned whether you were comparing your matching against SimpleFilter matching with indexing in CapabilitySet or with just straight matching. Looking at the patch, I see that indices don't really come into play. Still, if there are improvements that can be made to how matching is currently performed in the non-indexed case, let's figure out how we can improve the current matching algorithm without throwing everything completely away.
Even though it may not seem like it, I do appreciate you looking into this. :-)
> Add generic type information to SimpleFilter
> --------------------------------------------
>
> Key: FELIX-3202
> URL: https://issues.apache.org/jira/browse/FELIX-3202
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: Lucas Galfaso
> Priority: Minor
> Attachments: felix_java5_filter.diff
>
>
> SimpleFilter does not have Java 5 generic type information and it is very hard to add this to the current implementation.
> Devise a way to add generate type information to SimpleFilter while keeping in mind that this is a critical component and any performance degradation would slow down the entire framework
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FELIX-3202) Add generic type information to
SimpleFilter
Posted by "Lucas Galfaso (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lucas Galfaso updated FELIX-3202:
---------------------------------
Attachment: FELIX-3202.diff
Alternative implementation of SimpleFilter that has the short-circuit mechanism for attributes that are indexed
> Add generic type information to SimpleFilter
> --------------------------------------------
>
> Key: FELIX-3202
> URL: https://issues.apache.org/jira/browse/FELIX-3202
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: Lucas Galfaso
> Priority: Minor
> Attachments: FELIX-3202.diff, felix_java5_filter.diff
>
>
> SimpleFilter does not have Java 5 generic type information and it is very hard to add this to the current implementation.
> Devise a way to add generate type information to SimpleFilter while keeping in mind that this is a critical component and any performance degradation would slow down the entire framework
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3202) Add generic type information to
SimpleFilter
Posted by "Richard S. Hall (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148236#comment-13148236 ]
Richard S. Hall commented on FELIX-3202:
----------------------------------------
Keep in mind that the indexed case is the normal case for just about all use cases. It is how the resolver works and how the service registry works. Calling Filter.match() is not common, so its performance is less critical. Still, if we can improve it, then good.
Internally, I tried to use the same code to do the match in either case to avoid duplication of code and the bugs that result, so this is likely why the matching in the single matching case in the current implementation is slower since it is more generic (and thus more complicated) than it needs to be for single matching.
Still, the thing to remember is that single matching is much less important than the indexed case.
> Add generic type information to SimpleFilter
> --------------------------------------------
>
> Key: FELIX-3202
> URL: https://issues.apache.org/jira/browse/FELIX-3202
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: Lucas Galfaso
> Priority: Minor
> Attachments: felix_java5_filter.diff
>
>
> SimpleFilter does not have Java 5 generic type information and it is very hard to add this to the current implementation.
> Devise a way to add generate type information to SimpleFilter while keeping in mind that this is a critical component and any performance degradation would slow down the entire framework
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3202) Add generic type information to
SimpleFilter
Posted by "Richard S. Hall (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148159#comment-13148159 ]
Richard S. Hall commented on FELIX-3202:
----------------------------------------
If I were you, I'd start with what is there and try to improve it.
> Add generic type information to SimpleFilter
> --------------------------------------------
>
> Key: FELIX-3202
> URL: https://issues.apache.org/jira/browse/FELIX-3202
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: Lucas Galfaso
> Priority: Minor
> Attachments: felix_java5_filter.diff
>
>
> SimpleFilter does not have Java 5 generic type information and it is very hard to add this to the current implementation.
> Devise a way to add generate type information to SimpleFilter while keeping in mind that this is a critical component and any performance degradation would slow down the entire framework
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3202) Add generic type information to
SimpleFilter
Posted by "Richard S. Hall (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149223#comment-13149223 ]
Richard S. Hall commented on FELIX-3202:
----------------------------------------
Not sure I understand your (2) issue. Are you saying that the current implement assumes that the attribute to be indexed is always the same time? If so, then yes, that is probably true. In theory, though, probably not 100% correct. Even then, there is a slight exception to this already, since it allows the value to be a list type of the same type too.
> Add generic type information to SimpleFilter
> --------------------------------------------
>
> Key: FELIX-3202
> URL: https://issues.apache.org/jira/browse/FELIX-3202
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: Lucas Galfaso
> Priority: Minor
> Attachments: felix_java5_filter.diff
>
>
> SimpleFilter does not have Java 5 generic type information and it is very hard to add this to the current implementation.
> Devise a way to add generate type information to SimpleFilter while keeping in mind that this is a critical component and any performance degradation would slow down the entire framework
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3202) Add generic type information to
SimpleFilter
Posted by "Lucas Galfaso (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145562#comment-13145562 ]
Lucas Galfaso commented on FELIX-3202:
--------------------------------------
I would like to split this conversation into multiple easy-to-digest parts:
(1) I do not know about the spec history, why it changed or how it will change if the future, so maybe there are other reasons that I am not aware of that make more sense to keep the existing implementation as-is
(2) The proposed implementation has the benefit that it is easier to understand (I know this is not objective and other people may think otherwise), the fact that it uses Java 5 generics can be though as a plus. Maybe the description of the issue has to be changed to reflect this
(3) It adds more classes, but from the point of view of lines of code, it is just modestly larger (if you include the code at SimpleFilter and the code that does the matching at CapabilitySet)
(4) It is a lot faster, the test show that matching takes about half the time if you compare it with SimpleFilter, if the test is wrong and this result is not representative, please let me know and I will work on fixing it
(5) I do not understand the comment "which is not what we want", it is my understanding that between two alternatives that follow the standard, with about the same number of lines of code and same complexity, the implementation that is faster would be the alternative to follow. This is, even if one has 10 inner classes and the other no inner classes at all. Again, if this understanding is wrong, please let me know
> Add generic type information to SimpleFilter
> --------------------------------------------
>
> Key: FELIX-3202
> URL: https://issues.apache.org/jira/browse/FELIX-3202
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: Lucas Galfaso
> Priority: Minor
> Attachments: felix_java5_filter.diff
>
>
> SimpleFilter does not have Java 5 generic type information and it is very hard to add this to the current implementation.
> Devise a way to add generate type information to SimpleFilter while keeping in mind that this is a critical component and any performance degradation would slow down the entire framework
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FELIX-3202) Add generic type information to
SimpleFilter
Posted by "Lucas Galfaso (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lucas Galfaso updated FELIX-3202:
---------------------------------
Attachment: felix_java5_filter.diff
Attached is a partial patch for a SimpleFilter replacement and some tests to check it's proper behavior.
SFilter parsing performance is slightly faster to on par with SimpleFilter parsing with the exception of the aprox filter that is somehow slower as it implements a minimal soundex comparison.
SFilter matching is substantially faster than SimpleFilter.
> Add generic type information to SimpleFilter
> --------------------------------------------
>
> Key: FELIX-3202
> URL: https://issues.apache.org/jira/browse/FELIX-3202
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: Lucas Galfaso
> Priority: Minor
> Attachments: felix_java5_filter.diff
>
>
> SimpleFilter does not have Java 5 generic type information and it is very hard to add this to the current implementation.
> Devise a way to add generate type information to SimpleFilter while keeping in mind that this is a critical component and any performance degradation would slow down the entire framework
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3202) Add generic type information to
SimpleFilter
Posted by "Lucas Galfaso (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148173#comment-13148173 ]
Lucas Galfaso commented on FELIX-3202:
--------------------------------------
I think that the reason SFilter is faster in the static version than the current implementation is that in the current implementation a lot of time is spend copying the bundle capabilities from one set to another.
Note: I do see that if an index is hit, then this is a big performance improvement (in fact, it looks like there are some small hacking here and there so the indexed attribute is hit first), so I know that keeping this is critical.
> Add generic type information to SimpleFilter
> --------------------------------------------
>
> Key: FELIX-3202
> URL: https://issues.apache.org/jira/browse/FELIX-3202
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: Lucas Galfaso
> Priority: Minor
> Attachments: felix_java5_filter.diff
>
>
> SimpleFilter does not have Java 5 generic type information and it is very hard to add this to the current implementation.
> Devise a way to add generate type information to SimpleFilter while keeping in mind that this is a critical component and any performance degradation would slow down the entire framework
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (FELIX-3202) Add generic type
information to SimpleFilter
Posted by "Richard S. Hall (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146070#comment-13146070 ]
Richard S. Hall edited comment on FELIX-3202 at 11/8/11 4:14 AM:
-----------------------------------------------------------------
(3) Java basically encourages people to create classes all over the place for listeners, tasks, etc. At the Java source file level these classes are hidden and appear cost free since they are in the same source file, but once compiled (as you probably know) they are expanded out into tons of separate classes, resulting in major class loading storms when starting an application. Granted, the framework has already grown beyond what I am happy with since the spec continues to bloat, but I still worry about these issues. The framework is intended to run on everything from small devices to servers, so everyone benefits if we can keep it tight. I'd be happier with patches that removed large pieces of unnecessary junk to make it smaller, rather than adding tons of stuff to make it more readable. Clearly, this is a losing battle over time (if not lost already) and there is tension because sometimes abstractions are useful even though they may bloat the implementation. It's a balancing act and there is no clear right or wrong answer, it just depends.
(4) I believe the numbers you are seeing, I questioned whether you were comparing your matching against SimpleFilter matching with indexing in CapabilitySet or with just straight matching. Looking at the patch, I see that indices don't really come into play. Still, if there are improvements that can be made to how matching is currently performed in the non-indexed case, let's figure out how we can improve the current matching algorithm without throwing everything completely away.
Even though it may not seem like it, I do appreciate you looking into this. :-)
was (Author: rickhall):
(3) Java basically encourages people to create classes all over the place for listeners, tasks, etc. At the .java these classes are hidden and appear cost free since they are in the same source file, but once compiled (as you probably know) they are expanded out into tons of separate classes, resulting into major class loading storms when starting an application. Granted, the framework has already grown beyond what I am happy with since the spec continues to bloat, but I still worry about these issues. The framework is intended to run on everything from small devices to servers, so everything benefits if we can keep it tight. I'd be happier with patches that removed large pieces of unnecessary junk to make it smaller, rather than adding tons of stuff to make it more readable. Clearly, this is a losing battle over time (if not lost already) and there is tension because sometimes abstractions are useful even though they may bloat the implementation. It's a balancing act and there is no clear right or wrong answer, it just depends.
(4) I believe the numbers you are seeing, I questioned whether you were comparing your matching against SimpleFilter matching with indexing in CapabilitySet or with just straight matching. Looking at the patch, I see that indices don't really come into play. Still, if there are improvements that can be made to how matching is currently performed in the non-indexed case, let's figure out how we can improve the current matching algorithm without throwing everything completely away.
Even though it may not seem like it, I do appreciate you looking into this. :-)
> Add generic type information to SimpleFilter
> --------------------------------------------
>
> Key: FELIX-3202
> URL: https://issues.apache.org/jira/browse/FELIX-3202
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: Lucas Galfaso
> Priority: Minor
> Attachments: felix_java5_filter.diff
>
>
> SimpleFilter does not have Java 5 generic type information and it is very hard to add this to the current implementation.
> Devise a way to add generate type information to SimpleFilter while keeping in mind that this is a critical component and any performance degradation would slow down the entire framework
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3202) Add generic type information to
SimpleFilter
Posted by "Lucas Galfaso (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149189#comment-13149189 ]
Lucas Galfaso commented on FELIX-3202:
--------------------------------------
I have a partial patch that handles the non-indexed and the indexed scenario, but the performance improvements are not as big as before and depends if we only look for all elements in an index (about the same speed) to 15% if the filter is slightly more complex (there are other cases where the improvement is much bigger but I think will be less common scenarios.)
Note: In the tests performed I did put the attribute that is indexed first as the current implementation has some issues if that is not the case.
BTW(1), the new implementation does not have this ordering issue so some small hackery can be removed, but I think that would be just a minor plus if this ever make it to trunk.
BTW(2), the current implementation makes the assumption that all fields that are indexes appear in the filter using the same class. This is true for the current uses of CapabilitySet as the value of the indexed fields will always be Strings at SimpleFilter (even when a SimpleFilter may have a Version in it's value), this is now explicit in the new implementation.
Will post a new patch once I have a complete one that applies cleanly over trunk.
> Add generic type information to SimpleFilter
> --------------------------------------------
>
> Key: FELIX-3202
> URL: https://issues.apache.org/jira/browse/FELIX-3202
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: Lucas Galfaso
> Priority: Minor
> Attachments: felix_java5_filter.diff
>
>
> SimpleFilter does not have Java 5 generic type information and it is very hard to add this to the current implementation.
> Devise a way to add generate type information to SimpleFilter while keeping in mind that this is a critical component and any performance degradation would slow down the entire framework
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3202) Add generic type information to
SimpleFilter
Posted by "Richard S. Hall (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146033#comment-13146033 ]
Richard S. Hall commented on FELIX-3202:
----------------------------------------
(1) The spec won't change to eliminate matching by the filter, but it is still the wrong approach when trying to optimize. It is the equivalent of giving each row in a table to a SELECT and asking the SELECT if the row matches. This doesn't make sense from an optimization point of view.
(2) This falls into the "eye of the beholder", so I'm not sure how to quantify.
(3) Due to spending lots of time programming with class loaders, I tend to worry about number of classes and number of class loads, not lines of code.
(4) I'm not sure how the tests were performed, but most of the time filters are run against a CapabilitySet which maintains indices, so I'd be surprised if 50% faster. If you are talking purely about un-indexed matching, then let's work on improving the match operation.
(5) SimpleFilter is an implementation detail of the framework which is used to implement Filter for the OSGi. However, its primary purpose is to be used internally by the framework resolver to match capabilities to requirements. The internal dependency model of the Felix framework is based on a generic dependency model built on top of SimpleFilter, which requires that we reverse the matching to introduce indices, much like a database.
> Add generic type information to SimpleFilter
> --------------------------------------------
>
> Key: FELIX-3202
> URL: https://issues.apache.org/jira/browse/FELIX-3202
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: Lucas Galfaso
> Priority: Minor
> Attachments: felix_java5_filter.diff
>
>
> SimpleFilter does not have Java 5 generic type information and it is very hard to add this to the current implementation.
> Devise a way to add generate type information to SimpleFilter while keeping in mind that this is a critical component and any performance degradation would slow down the entire framework
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3202) Add generic type information to
SimpleFilter
Posted by "Richard S. Hall (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145248#comment-13145248 ]
Richard S. Hall commented on FELIX-3202:
----------------------------------------
This replaces one class with 13 to add generics? Is that correct? If so, it seems like overkill to me. I'd certainly be interested in any performance improvements you can find, but i'd prefer it to be piecemeal against the current "simple" implementation.
Also, this does the matching in the filter implementation, which is not what we want, since matching needs to be run against our indices in CapabilitySet. That's why CapabilitySet does the matching currently. The OSGi spec historically reversed the direction here by having the filter do the matching, but that is not really what you want because it forces you to pass one capability at a time to the filter.
> Add generic type information to SimpleFilter
> --------------------------------------------
>
> Key: FELIX-3202
> URL: https://issues.apache.org/jira/browse/FELIX-3202
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: Lucas Galfaso
> Priority: Minor
> Attachments: felix_java5_filter.diff
>
>
> SimpleFilter does not have Java 5 generic type information and it is very hard to add this to the current implementation.
> Devise a way to add generate type information to SimpleFilter while keeping in mind that this is a critical component and any performance degradation would slow down the entire framework
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3202) Add generic type information to
SimpleFilter
Posted by "Lucas Galfaso (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146057#comment-13146057 ]
Lucas Galfaso commented on FELIX-3202:
--------------------------------------
(1) Let me think about this
(2) True, let's discard this
(3) Classes are loaded once and reused, is this something that can be measured once all the classes are loaded?
(4) If you apply the patch, the test has a flag to enable the performance test. The numbers show the number of ms needed to run 100k matches. In my box, this is about half for SFilter vs SimpleFilter, again if there is anything wrong with the test, I am willing to fix it
(5) Let me think about this
> Add generic type information to SimpleFilter
> --------------------------------------------
>
> Key: FELIX-3202
> URL: https://issues.apache.org/jira/browse/FELIX-3202
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: Lucas Galfaso
> Priority: Minor
> Attachments: felix_java5_filter.diff
>
>
> SimpleFilter does not have Java 5 generic type information and it is very hard to add this to the current implementation.
> Devise a way to add generate type information to SimpleFilter while keeping in mind that this is a critical component and any performance degradation would slow down the entire framework
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3202) Add generic type information to
SimpleFilter
Posted by "Lucas Galfaso (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148120#comment-13148120 ]
Lucas Galfaso commented on FELIX-3202:
--------------------------------------
I took me some time, but I think there is a way to make the best of both worlds (or at least something close to that), this is, make the static version work fast and make use of indexes. What I am not sure about is that I will be able to do this and on top reduce the number of inner classes (without making the code hard to follow).
Give me a few days and I will be able to code this.
> Add generic type information to SimpleFilter
> --------------------------------------------
>
> Key: FELIX-3202
> URL: https://issues.apache.org/jira/browse/FELIX-3202
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: Lucas Galfaso
> Priority: Minor
> Attachments: felix_java5_filter.diff
>
>
> SimpleFilter does not have Java 5 generic type information and it is very hard to add this to the current implementation.
> Devise a way to add generate type information to SimpleFilter while keeping in mind that this is a critical component and any performance degradation would slow down the entire framework
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira