X11 forwarding lag in making graphical cuts on 2D histograms

Hello,

I’m a novice ROOT’er and I have a bit of an odd problem.

I use ROOT through ssh (w/ X11 forwarding) on a remote server at my university. Up to about a month ago I was using version 5.34.14. We since have upgraded versions on the remote server to 5.34.19, and now 5.34.23.

One of the things I noticed with the newer versions (19 and 23) is that when I’m generating a 2D histogram and performing graphical cuts there is a considerably noticeable lag when drawing the cuts. To make sure that I was not going crazy I went back and loaded version 14 and the lag was gone.

I have now tried this on multiple operating systems (ssh’ing in on Linux and Mac) and I notice the same problem.

It’s not a huge problem, but more of an annoyance. So I’m posting here to see if anyone else has encountered a similar problem. I have included a test code that I used to look at the three different versions and check the lag in drawing 2D cuts.

[code]void testCode(){
TCanvas *canvas = new TCanvas(“canvas”,“Canvas”);
TH2F *hist2D = TwoDimHistogramGenerator();
hist2D->Draw(“COL”);
}

TH2F *TwoDimHistogramGenerator(){
TF2 *TwoDimGauss = new TF2(“TwoDimGauss”,"[0]exp(-0.5((x**2)/[1]2+(y2)/[2]**2))");
TwoDimGauss->SetParameter(0,1);
TwoDimGauss->SetParameter(1,2);
TwoDimGauss->SetParameter(2,2);

TH2F *hist = new TH2F("hist","Fake Data",500,-20,20,500,-20,20);
hist->FillRandom("TwoDimGauss",50000);

return hist;

}[/code]

[Quick Thought]
When looking through the patch release notes I saw a graphic patch in version 18 that involved an OpenGL flag ‘CanvasPreferGL’ being set in the rootrc.in. I was just wondering if this would some how affect the X11 forwarding.

Thanks!

I am not sure I understand your problem…
So you execute the macro and then make a graphical cut on it using the Tool bar ?
and then you see a “lag when drawing the cuts”… where exactly ?

Can you be more explicit ? your macro looks fine seems to me … but, I guess, it does not show the problem … what should I do after to see that “lag” ?

Hi Couet,

Yes I execute the macro and then I make a graphical cut. I notice a “lag” in drawing the cuts when I’m using newer versions of root ( 5.34.19 and 5.34.23).

Sorry, I’ll try to explain my problem more explicitly.

Here is a step by step of how this problem comes about for me.

I first ssh into a remote server that has multiple versions of ROOT available through Environment Modules.

  1. I load in version 5.34.19 or 5.34.32.
  2. I execute the test macro.
  3. I begin to make a graphical cut.

This is where I notice a “lag” in X11 forwarding. Some times it even freezes on me.

  1. Next I load in an earlier version of ROOT (5.34.14) through Environment Modules.
  2. I execute the test macro.
  3. I begin to make graphical cut.

And now the noticeable lag is gone.

I am wondering if other people see this “lag” also between version 5.34.14 and 5.34.19/5.34.23? And if they do, were they able to fix it.

I do not think this is a problem with shh or our remote servers, as older versions of ROOT work perfectly fine. I was wondering if there was something different in the builds or even the config files that might explain why I see this lag.

Thanks for your reply!

3. I begin to make a graphical cut.

How ???

Through the toolbar menu.

I just tried on mac with:

$ root
   ---------------------------------------------------------------------
  | Welcome to ROOT 6.03/01                         http://root.cern.ch |
  |                                        (c) 1995-2014, The ROOT Team |
  | Built for macosx64                                                  |
  | From heads/master@v6-03-01-GEANT-99-g5c1971b, Dec 08 2014, 13:41:03 |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'          |
   ---------------------------------------------------------------------

$ root
   -------------------------------------------------------------------------
  | Welcome to ROOT 6.02/02                             http://root.cern.ch |
  |                                            (c) 1995-2014, The ROOT Team |
  | Built for macosx64                                                      |
  | From heads/v6-02-00-patches@v6-02-02-78-gf4bb825, Dec 08 2014, 09:22:55 |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'              |
   -------------------------------------------------------------------------

$ root
  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   5.34/24   2 December 2014   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

… with both X11 and Cocoa versions for each case (so 6 versions in total) and I do not see any lag when entering cut points.

Did you ssh into a remote server?

no, but it should not make any difference.
I will try

I just tried using ssh on lxplus with:

$ root
  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   5.34/20    12 August 2014   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

… and I do not see any lag…

Okay. Well thanks for your help. I’ll try to investigate this further and see if the problem originates from something non-ROOT related.

Thanks again!

Ok let me know… ( I hope I am looking at the right thing: When I click the interactively built line appear at the right place).

Hi,

I have narrowed this to an issue between 5.34.17 and 5.34.18. I have attached two movies demonstrating the change. (The forum would not permit me to upload .mp4 so I added the extra .dat extension.)

The toolbar is quite responsive, but the TCutG line is very slow to update.

Both versions were configured and compiled on RHEL Server release 6.6 (Santiago) with options --enable-minuit2 and --enable-roofit.
5.34.18.mp4.dat (261 KB)
5.34.17.mp4.dat (226 KB)

Ah ok, I see… I thought le points where lagged, i.e. not at the right place.
The lag is "in time’ not “in space”…
In fact it is just slow. The cut is correctly drawn.
(note that I do not see the lag in time via ssh either).

Let me try some suggestions.
In etc/system.rootrc try to set the following attributes the following way:

Canvas.MoveOpaque:          false
Canvas.ResizeOpaque:        false
Canvas.ShowGuideLines:     false

Let me know if it helps.

Hi ksmith and couet,

I added the flags to the .rootrc file

  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   5.34/14  16 December 2013   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

ROOT 5.34/14 (v5-34-14@v5-34-14, Dec 16 2013, 12:23:58 on linuxx8664gcc)

CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] gEnv->Print()
.....
Canvas.MoveOpaque:        false                          [Global]
Canvas.ResizeOpaque:      false                          [Global]
Canvas.ShowGuideLines:    false                          [User]
....

I think it helped a bit. I attached a screen cast below.
When compared with the 5.34.18 video ksmith took earlier, you can see that the lag is not as bad.

5.34.18_with_.rootrc_flags.mp4.dat (551 KB)

Yes it looks better. Also the results depend a lot of the network work at a given time.
With these flags set to false you are back to what was doing 5.34.17