I have a scene graph with 10,000 lines and plenty of other things within it. I want to be efficient in creating and displaying these lines.
I know 3 ways to do this, but I'm uncertain which would be best or if there is another way I haven't yet seen.
1. Create a feature node for each line with it's own feature that has it's own geometry.
2. Create a single feature node with a feature list of features each with it's own geometry.
3. Create a single feature node with a single feature with a multigeometry that has each line.
Which way is most efficient?
If I use a feature node for each line, the traversal is slow and FPS drops (however the program doesn't stall ever).
If I use a single feature node with a feature list, dirtying the feature node causes it to recompile and causes the program to stall for a few ms.
If I use a single feature node with a single feature with a multigeometry, I get the same response as above.
Is there another way to do this that would not cause a performance dip?
Re: Most efficient way to render a lot of geometries
Efficiently displaying the lines is easy with a FeatureNode (depending on your styling, approach #2 will consolidate the geometry during compilation and render efficiently).
If you need to update 10K geometries every frame, FeatureNode is probably not the best tool for the job -- the trade-off for convenience is that you have to recompile the entire node if you change the geometry or the style. For truly dynamic data you may be better off writing custom code.