I have generated around 60000 streamlines representing human brain white matter.
I plot a subselection of them using Graphics3D and the Line or Tube graphics primitives.
Plotting 10000 lines goes very smoothly. It takes a few seconds to pop up on the screen but once the graphics is there, its very responsive (rotating etc.).
Once the graphics is loaded in the notebook it uses around 500MB of memory on the mathematical front end.
With plotting tubes, I have much more difficulties. At first, it crashed the frontend while only rendering 100 tubes (vs 10000 lines). I noticed the crash was caused by memory depletion since the front end used all my available memory. By reducing the vertices used to render the tubes in Graphics 3D from {40,2} to {5,1} this issue was solved.
I can now render 1000 tubes without Mathematica crashing. Although the frontend still uses over2GB of memory. Which is almost 5x more than needed for rendering 10000 Lines.
However, the image is not really responsive. Each time I try to rotate it takes 1-2s for it to become responsive and after a couple of rotations, the Mathematica frontend quits responding altogether.
After monitoring my memory usage by Mathematica I noticed that each time I start to rotate the graphics and after I release my mouse button (which activates the antialiasing) the memory used by mathematical jumps up by 1-2GB after each mouse click. After 4 rotations my memory was almost full.
after I remove the Graphics from the notebook the memory is freed up again.
I'm running Mathematica 12.3 on windows 10 using an NVIDEA Quadro M1200
Is there anyone who can reproduce this behavior or can explain why this is happening? I have attached the notebook with the data and the code that shows this behavior.