Page 1 of 1

ViewPolar - linesize and memory usage

Posted: Fri Nov 27, 2015 10:51 am
by ahe
In our application the user can set the line size of each diagram at runtime. We noticed that setting linesizes > 1 resulted in much higher memory usage.

I added my sample code which creates a polar diagram with one point line series with 150.000 points and alternates the linesize between 1 and 2 every two seconds.

Memory consumption is about 300-400 MB for linesize = 1
Polar_memory_linesize1.png
Polar_memory_linesize1.png (74.07 KiB) Viewed 5720 times
and 600-900 MB with linesize = 2.
Polar_memory_linesize2.png
Polar_memory_linesize2.png (72.42 KiB) Viewed 5720 times
So far the values stay consistent after 30 minutes, so I don't think there's a memory leak.

Is there a technical explanation why larger linesizes result in such memory requirements?

Re: ViewPolar - linesize and memory usage

Posted: Fri Nov 27, 2015 7:58 pm
by ArctionPasi
When using LineWidth = 1, just the line end points are calculated and given to GPU.

When LineWidth > 1, the lines have to triangulated (tesselated) in LightningChart side and given as a little triangles for GPU. Memory required for that is many times larger than with line width of 1.