This macro demonstrates batch image mode of web canvas When enabled - several images converted into JSON before all together provided to headless browser to produce image files. 
Let significantly increase performance. Important - disable batch mode for flushing remaining images
 
{
   
 
   auto c = 
new TCanvas(
"canvas", 
"Canvas with histogram");
 
 
   auto h1 = 
new TH1I(
"hist", 
"Histogram with random data", 100, -5., 5);
 
 
   for (
int n = 0; 
n < 100; ++
n) {
 
   }
 
   
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
1-D histogram with an int per channel (see TH1 documentation)
 
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
 
virtual void FillRandom(TF1 *f1, Int_t ntimes=5000, TRandom *rng=nullptr)
 
void Draw(Option_t *option="") override
Draw this histogram with options.
 
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
 
static void BatchImageMode(UInt_t n=100)
Configure batch image mode for web graphics.
 
- Author
 - Sergey Linev 
 
Definition in file save_batch.C.