thanks for the tip, it’s working … but unfortunately there is no suport for GLCOL on TH2 
Do you know of any alternative ? Just testing it now and yes it’s blazing fast but I can’t use it
EDIT: I just realized, that this also happens with the GL histograms. When I cut off the pipe, no more messages are flowing, but ROOT is still processing the graphics. I thought this was a bottleneck on the graphics, but it seems that it’s not. When I restart the pipe, the plot is loading frames much faster to catch up with the train of incoming messages that are in the buffer. It’s after a while that it seems that a delay occurs. Could this be because of how I’m updating the histogram ?
TApplication RootApp("App", 0, 0);
gStyle->SetCanvasPreferGL(kTRUE);
TCanvas *canvas = new TCanvas("canvas", "CWT", 200, 10, 800, 600);
// canvas->cd(1);
auto hist = new TH2D("hist", "hist", 49, 0, 49, 114, 0, 114);
hist->SetStats(0);
hist->SetFillColor(55);
hist->SetTitle("CWT");
canvas->cd(1);
hist->Draw("GLSURF1");
BS::thread_pool pool(10);
while (true)
{
std::string message = cwtOutRootInSocket.receiveMessage();
cwts = json.cwtScaleOfScalesJsonToStruct(message);
std::reverse(cwts.eventOfEvents.begin(), cwts.eventOfEvents.end());
pool.parallelize_loop(0, cwts.eventOfEvents.at(0).size(),
[&cwts, &hist](const int a, const int b)
{
for (int t = 0; t < cwts.eventOfEvents.size(); ++t)
{
for (int i = a; i < b; ++i)
{
hist->Fill(i, t, cwts.eventOfEvents[t][i]);
}
}
})
.wait();
canvas->Pad()->Draw();
canvas->Modified();
canvas->Update();
gSystem->ProcessEvents();
hist->Reset();
}
If I cut the pipe on the first few minutes, the graph is very responsive and stops plotting immediately. If I let it run for, let’s say 15 minutes, then it starts getting delayed and visibly sluggish on drawing. If I cut the pipe, there is still data being plotted.
Note that partial pararellization of the fill has no substantial effect on it, I just did this to test what was going on. It seems to be fine without partial parallelization. Any hints on this would be helpful, thanks.