i'm trying to make a visualization of many experiments where i can choose which experiments i want to display using a table. The plot for each experiment consists of many individual graphs and i want to display all experiments in one qcustomplot.
so my idea was to group all graphs belonging to the same experiment into a layer - this makes it very easy to turn the visibility of a single experiment on/off (also with the lmBuffered option the replotting is very fast)
however adding a layer is very slow, and gets slower when adding more and more layers.
so the other option i tried is to constantly regenerate all plots whenever i change the visibility of a single experiment - the problem with this is, that i need to delete all plottables whenever i change my selection of what i want to display. Deleting all plottables is also very slow... (>10x slower than generating all plottables!)
so the only fast way i found was to put all plottables in a single layer and then shift them to a "waste" layer which i set to invisible whenever i change the selection and regenerate all graphs again...
is there any other way to do this efficiently without just allocating more and more memory?
- somehow speeding up the addLayer?
- somehow speeding up the clearPlottables?