Grasshopper Batch loop within Batch loop using metahopper component

Hi everyone,

I’ strolling to use a batch component within another batch component.
basically, I need the first batch to trigger the second Bach for each loop.

I should end up in a 0,1 on the top panel an 0,1,2,3,4,0,1,2,3,4 on the bottom panel.
It is not working.

maybe using these metahopper blocks isn’t the way to go, I’m using this to loop through a list of indexes, change variables from a list of values according to that index and export the geometry.

I tried using a combination of the batchdriver from metahooper and fast loop from anemone, but I is was 2 slow, the loop end component takes around 40sec to compute even when it not being used. (17.3 KB)

If you want to study nested combinations like this, I’d recommend creating your lists of variable combinations statically in one go, with Cross Reference, and then using the batch component to iterate over that list. Here’s an example:

Thanks for that, I’ll have a go at it.

The problem I see is that the main loop takes around 50sec per item, the second loop takes around 6sec per item.

I have 10 items on the main loop and 4 items on the second loop, it will increase the computation time by X 40

Grasshopper’s really not good at scenarios like that where you want fine-grained control over when and how stuff executes. Best bet is probably to generate your main loop results in one go, store them / cache them somehow, and then run your second loop separately, just loading/reading the cached data instead of generating it anew.