flattenStrong vs many geom nodes

I need to highlight an area in a hexagonal field with lines on the ground. Right now I’m using a simple quad model for a segment of the line, which looks great, but the problem is that results in ~100 geom nodes, which slows down rendering by about 20fps.

I can call flattenStrong on it, which recovers the fps, but this takes too long to do on one frame. There is a noticeable pause as flattenStrong executes (the call alone slows the fps down to 20 for that one frame). It should be noted I may need to redraw the lines about once every 5-10 seconds, so it’s very noticeable when it happens.

So is there a way to get the best of both worlds? Some way to append models to a geom so I don’t need to call flattenStrong on them at the end? Or at worst some way to spread flatttenStrong over a few frames.

Alternatively, could I get some speedup by precombining some of the models? That is, instead of adding a new model for each edge of a hexagon in turn, deciding which of the precombined models the hexagon needs to show and adding only that. It would possibly halve the number of models to be flattenStronged, but I don’t know if that’s the bottleneck, and wouldn’t help me on some cases where there are many hexagons with only one line to show.

RigidBodyCombiner may help. it’s introduced in the manual.

I experimented a bit with RigidBodyCombiner, but it seems to be slower than just leaving each line as a node in the first place. It also has the added problem that I need at least as many lines extant in the combiner as the maximum number I want to display, which is hard to guess beforehand.

I managed to solve the issue by using GeomVertexWriter to create a new mesh procedurally every time I need one. Not the most coder-friendly solution, but it works.