Better to filter several parameters at once or one by one

Is it better to filter by several parameters at once, or work through several parameters one by one?

See the example in the graph below. The top graph filters one by one while the bottom filters 2x parameters at once, the top graph also runs marginally faster than the bottom on.

I’m surprised that the difference in run times is enough for you to notice. The top branch would end up likely being faster over a very large number of elements, but you shouldn’t notice it at this stage.

Either way, the choice is up to you. Both options are totally fine. In my opinion the bottom branch is neater and easier to understand, but as we’ve both said now, the top branch can give you better performance on larger datasets at a certain point, though it’s not guaranteed.

1 Like

@BJozi , hi

Thats really depending, what you want to do, i use bulk, or i filter parameter values via keys, …
Sometimes i call them in a python block…

What i recognized, it is better to cluster your elements to change f.e. by Level, by Name,… a.s.o. Dynamo is performing bad >1000 elements to change at the same time!

This feels like a choice between Clarity and Performance as rightly noted by others in this thread :smiley: It’s simply up to you to pick what is best for you!

I would say, in my experience, that clarity becomes increasingly important the larger a graph becomes, so if the performance hit is small, I personally would go that way :muscle:

1 Like

Ok, so it’s quite normal to take either approach. I only noticed the difference in performance because I checked using TuneUp, the difference in run-time otherwise was discernible.

The method @Draxl_Andreas has in his example looks even clearer than how I had it setup.

One to add to my growing list of Dynamo skills

1 Like

One thing to note is that there will always be a minor difference in timed runs on TuneUp as lag, latency and other machine operations can play out too :smiley: So if you want a true representation, it’s better to do a few runs and average it out.

The difference was minor, if I remember correctly one was 360ish ms while the other was 220ms or something like that.

The time difference was secondary to questioning which is a better method to use