Turn off the optimization of the macros generated byTCanvas::Print(). These macros have a linear structure without computation and logic, but they can contain many function call. Optimising such code takes time and can slow down a lot the code execution with Cling. This speed up a lot the execution of stressGraphics as shown by the following stressGraphics output : Before the change:
Turn off the optimization of the macros generated byTCanvas::Print(). These macros have a linear structure without computation and logic, but they can contain many function call. Optimising such code takes time and can slow down a lot the code execution with Cling. This speed up a lot the execution of stressGraphics as shown by the following stressGraphics output :
Before the change:

**********************************************************************
*  SYS: 10.12.4 Mac OS X
**********************************************************************
* stressGraphics: Real Time =  54.90 seconds Cpu Time =  54.19 seconds
**********************************************************************
*  ROOTMARKS = 747.8   *  Root6.09/03   20170308/940
**********************************************************************

After the change:
**********************************************************************
*  SYS: 10.12.4 Mac OS X
**********************************************************************
* stressGraphics: Real Time =  22.45 seconds Cpu Time =  22.02 seconds
**********************************************************************
*  ROOTMARKS =1840.3   *  Root6.09/03   20170308/940
**********************************************************************

agarciamontoro/root,karies/root,olifre/root,karies/root,karies/root,mhuwiler/rootauto,bbockelm/root,karies/root,bbockelm/root,olifre/root,BerserkerTroll/root,olifre/root,root-mirror/root,zzxuanyuan/root,zzxuanyuan/root,mhuwiler/rootauto,BerserkerTroll/root,zzxuanyuan/root,simonpf/root,root-mirror/root,davidlt/root,BerserkerTroll/root,mhuwiler/rootauto,mhuwiler/rootauto,karies/root,bbockelm/root,mhuwiler/rootauto,mhuwiler/rootauto,bbockelm/root,olifre/root,simonpf/root,bbockelm/root,olifre/root,agarciamontoro/root,agarciamontoro/root,bbockelm/root,root-mirror/root,bbockelm/root,mhuwiler/rootauto,davidlt/root,davidlt/root,davidlt/root,bbockelm/root,bbockelm/root,karies/root,root-mirror/root,zzxuanyuan/root,davidlt/root,agarciamontoro/root,zzxuanyuan/root,olifre/root,root-mirror/root,zzxuanyuan/root,bbockelm/root,zzxuanyuan/root,agarciamontoro/root,root-mirror/root,davidlt/root,simonpf/root,agarciamontoro/root,zzxuanyuan/root,agarciamontoro/root,mhuwiler/rootauto,simonpf/root,root-mirror/root,simonpf/root,mhuwiler/rootauto,simonpf/root,zzxuanyuan/root,BerserkerTroll/root,zzxuanyuan/root,zzxuanyuan/root,karies/root,BerserkerTroll/root,simonpf/root,root-mirror/root,olifre/root,davidlt/root,BerserkerTroll/root,agarciamontoro/root,BerserkerTroll/root,zzxuanyuan/root,mhuwiler/rootauto,BerserkerTroll/root,olifre/root,mhuwiler/rootauto,davidlt/root,root-mirror/root,BerserkerTroll/root,davidlt/root,karies/root,olifre/root,root-mirror/root,agarciamontoro/root,simonpf/root,simonpf/root,olifre/root,davidlt/root,simonpf/root,olifre/root,agarciamontoro/root,BerserkerTroll/root,bbockelm/root,BerserkerTroll/root,davidlt/root,karies/root,karies/root,karies/root,simonpf/root,agarciamontoro/root,root-mirror/root