Quantcast

sequential FilterLists vs CompositeMatcherEditor

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

sequential FilterLists vs CompositeMatcherEditor

Fabian Zeindl
Hi,

 I'm not sure whether to use multiple FilterLists or one list and a CompositeMatcherEditor in my app.

The data filtered is largely hierarchical like Country->PostalCode->Town.

My question basically is: If, for example, the 3rd MatcherEditor (for Town) is relaxed, will the MatcherEditors before that will be applied again, or does CompositeMatcherEditor "remember" which MatcherEditor already excluded which ListItems?

Thank you
Fabian
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sequential FilterLists vs CompositeMatcherEditor

mauromol
Il 26/11/2016 12:43, Fabian Zeindl ha scritto:
> My question basically is: If, for example, the 3rd MatcherEditor (for Town) is relaxed, will the MatcherEditors before that will be applied again, or does CompositeMatcherEditor "remember" which MatcherEditor already excluded which ListItems?
>
As far as I could remember, the CompositeMatcherEditor is able to
optimize the fired add/remove events to generate based on the match mode
(AND or OR). Hence, I would go with the use of a single
CompositeMatcherEditor vs a cascade of FilterLists with separate
MatcherEditors, if the intermediate FilterLists are not needed for
something else..

--

Mauro Molinari
E-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sequential FilterLists vs CompositeMatcherEditor

robeden
It's going to depend on your application logic for filtering, list size, etc. If you can break out checks that are expensive, don't change very often and the list isn't redone very often, then you might benefit from breaking out a check. You might also find that logic is easier to separate when the checks are broken out.

But on the flip side, each FilterList brings memory overhead so if your memory requirements are tight, there might also be too much memory cost to chains.

All this to say: there are multiple ways to do it and you'll need to experiment to find which is best for your app. (Just remember that premature optimization is the root of all evil. Start with the easiest and cleanest and then optimize if you find you need to.)
On Sat, Nov 26, 2016 at 7:01 AM Mauro Molinari <[hidden email]> wrote:
Il 26/11/2016 12:43, Fabian Zeindl ha scritto:
> My question basically is: If, for example, the 3rd MatcherEditor (for Town) is relaxed, will the MatcherEditors before that will be applied again, or does CompositeMatcherEditor "remember" which MatcherEditor already excluded which ListItems?
>
As far as I could remember, the CompositeMatcherEditor is able to
optimize the fired add/remove events to generate based on the match mode
(AND or OR). Hence, I would go with the use of a single
CompositeMatcherEditor vs a cascade of FilterLists with separate
MatcherEditors, if the intermediate FilterLists are not needed for
something else..

--

Mauro Molinari
E-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sequential FilterLists vs CompositeMatcherEditor

Fabian Zeindl
Right, thanks both of you for the info.

fabian

> On 26 Nov 2016, at 14:20 , Rob Eden <[hidden email]> wrote:
>
> It's going to depend on your application logic for filtering, list size, etc. If you can break out checks that are expensive, don't change very often and the list isn't redone very often, then you might benefit from breaking out a check. You might also find that logic is easier to separate when the checks are broken out.
>
> But on the flip side, each FilterList brings memory overhead so if your memory requirements are tight, there might also be too much memory cost to chains.
>
> All this to say: there are multiple ways to do it and you'll need to experiment to find which is best for your app. (Just remember that premature optimization is the root of all evil. Start with the easiest and cleanest and then optimize if you find you need to.)
> On Sat, Nov 26, 2016 at 7:01 AM Mauro Molinari <[hidden email]> wrote:
> Il 26/11/2016 12:43, Fabian Zeindl ha scritto:
> > My question basically is: If, for example, the 3rd MatcherEditor (for Town) is relaxed, will the MatcherEditors before that will be applied again, or does CompositeMatcherEditor "remember" which MatcherEditor already excluded which ListItems?
> >
> As far as I could remember, the CompositeMatcherEditor is able to
> optimize the fired add/remove events to generate based on the match mode
> (AND or OR). Hence, I would go with the use of a single
> CompositeMatcherEditor vs a cascade of FilterLists with separate
> MatcherEditors, if the intermediate FilterLists are not needed for
> something else..
>
> --
>
> Mauro Molinari
> E-mail: [hidden email]
>

Loading...