Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353943

Summary: [JAXB] LaunchTab UI scalability issues
Product: [Tools] PTP Reporter: Albert L. Rossi <arossi>
Component: RMAssignee: Albert L. Rossi <arossi>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: drwootton
Version: 5.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
patch which changes validation logic none

Description Albert L. Rossi CLA 2011-08-04 18:47:19 EDT
Created attachment 200949 [details]
patch which changes validation logic

With a large configuration of 80+ widgets, performance slows down to an unacceptable level when entering data, switching from tab to tab inside the ResourcesTab.

This has been observed on Windows 7, not as much on Vista.  It has not yet been test on other platforms.

One issue may be the amount of work done on updates, especially using validation. the current implementation potentially runs all the validators each time there is an update (the worse case scenario is when all values are valid).

The attached patch has refactored the code to trigger validation on a widget only at initialization and when there is an actual update for that widget.

I am not sure whether these changes break other things or introduce new bugs, which is why I have not just updated PTP 5_0 with them.

It would be useful if this patch could be applied and tested on the new PE implementation to see if there is any improvement and how significant it is.
Comment 1 Greg Watson CLA 2011-08-05 08:53:31 EDT
Here are my observations on OS X with the resource manager configured to use a remote system:

1. Without the patch, I see about a 1/2 second delay switching between tabs. I would say this is borderline problematic. I instrumented some of the remote tools classes and it appears that there are three remote file validations occurring each time a tab is selected.

2. With the patch, I don't see any noticeable delay between switching tabs. The file validators are only called when I edit one of the validated text fields.

3. In both cases, I see an approx. 3 second delay when I first select the resource manager in the resources tab. I attribute this to the delay caused by initializing the RSE service provider. Normally there should be a progress monitor displayed in the dialog (or a separate progress dialog) during this initialization. This is probably something that needs to be addressed also.
Comment 2 Albert L. Rossi CLA 2011-08-05 09:04:40 EDT
(In reply to comment #1)
> Here are my observations on OS X with the resource manager configured to use a
> remote system:
> 
> 1. Without the patch, I see about a 1/2 second delay switching between tabs. I
> would say this is borderline problematic. I instrumented some of the remote
> tools classes and it appears that there are three remote file validations
> occurring each time a tab is selected.
> 
> 2. With the patch, I don't see any noticeable delay between switching tabs. The
> file validators are only called when I edit one of the validated text fields.
> 
> 3. In both cases, I see an approx. 3 second delay when I first select the
> resource manager in the resources tab. I attribute this to the delay caused by
> initializing the RSE service provider. Normally there should be a progress
> monitor displayed in the dialog (or a separate progress dialog) during this
> initialization. This is probably something that needs to be addressed also.

OK, it sounds like the patch should be applied.  I will go ahead and commit it, unless you have reservations.

Could the initial delay be JAXB building?  What happens when you tab off of the Resources Tab onto the Application Tab, and then back?
Comment 3 Albert L. Rossi CLA 2011-08-05 09:08:37 EDT
(In reply to comment #2)
> (In reply to comment #1)
> > Here are my observations on OS X with the resource manager configured to use a
> > remote system:
> > 
> > 1. Without the patch, I see about a 1/2 second delay switching between tabs. I
> > would say this is borderline problematic. I instrumented some of the remote
> > tools classes and it appears that there are three remote file validations
> > occurring each time a tab is selected.
> > 
> > 2. With the patch, I don't see any noticeable delay between switching tabs. The
> > file validators are only called when I edit one of the validated text fields.
> > 
> > 3. In both cases, I see an approx. 3 second delay when I first select the
> > resource manager in the resources tab. I attribute this to the delay caused by
> > initializing the RSE service provider. Normally there should be a progress
> > monitor displayed in the dialog (or a separate progress dialog) during this
> > initialization. This is probably something that needs to be addressed also.
> 
> OK, it sounds like the patch should be applied.  I will go ahead and commit it,
> unless you have reservations.
> 
> Could the initial delay be JAXB building?  What happens when you tab off of the
> Resources Tab onto the Application Tab, and then back?

One other thought:  all validators are still run on initialization.  This might contribute to the initial slow-down as well.  However, once the new code is in place, it should not be possible to save invalid values to the environment, which means initialization does not need to include validation.
Comment 4 Albert L. Rossi CLA 2011-08-05 14:48:46 EDT
I note that this patch is not yet ready for prime-time, as it now seems to be introducing a null into LaunchConfiguration which forces you to hit apply every time you open the Run Configuration.  I will fix this before committing the changes.
Comment 5 Albert L. Rossi CLA 2011-08-05 15:35:33 EDT
(In reply to comment #4)
> I note that this patch is not yet ready for prime-time, as it now seems to be
> introducing a null into LaunchConfiguration which forces you to hit apply every
> time you open the Run Configuration.  I will fix this before committing the
> changes.

This may actually have just been  a fluke.  It doesn't seem to be happening anymore.
Comment 6 David Wootton CLA 2011-08-06 21:07:26 EDT
I set up a PTP 5.0 branch installation on my x86 Linux system. I have not tried tried the patch since I just saw the reference in the bug report. However with validators I was seeing the same lags between switching tabs that Greg reported as well as significant lags when entering data in a field.

I commented out all the validators and did not have any more noticable lags either typing in fields or switching tabs. 

I will try the patch with validators in my XML to be sure it works on Linux.

I was going to try to profile the JAXB code using the TPTP profiler which I've used before on Linux. However the TPTP project page says the project is being archived and the last release was for Helios. I tried installing it anyway and was able to get it installed, but the agent controller apparently would not start. 

I'm not sure where to proceed with profiling.

I did try running on my Windows 7 system yesterday and for some reason was not seeing any performance problems there like I had been seeing.
Comment 7 Albert L. Rossi CLA 2011-08-06 22:16:56 EDT
(In reply to comment #6)
> I set up a PTP 5.0 branch installation on my x86 Linux system. I have not tried
> tried the patch since I just saw the reference in the bug report. However with
> validators I was seeing the same lags between switching tabs that Greg reported
> as well as significant lags when entering data in a field.
> 
> I commented out all the validators and did not have any more noticable lags
> either typing in fields or switching tabs. 
> 
> I will try the patch with validators in my XML to be sure it works on Linux.
> 
> I was going to try to profile the JAXB code using the TPTP profiler which I've
> used before on Linux. However the TPTP project page says the project is being
> archived and the last release was for Helios. I tried installing it anyway and
> was able to get it installed, but the agent controller apparently would not
> start. 
> 
> I'm not sure where to proceed with profiling.
> 
> I did try running on my Windows 7 system yesterday and for some reason was not
> seeing any performance problems there like I had been seeing.

I think that you should apply the patch and try it on both Windows 7 and Linux.  Greg says it worked on the Mac.  Profiling at this point would be secondary if the patch fixes things.
Comment 8 David Wootton CLA 2011-08-07 19:50:34 EDT
I applied the patch on both Windows 7 and Linux and it looks like interactive response in the run configuration dialog for both is good. I will ask the person on my team who was also seeing the problem to try the patch as well.
Comment 9 Greg Watson CLA 2012-10-26 10:34:15 EDT
I believe this is no longer an issue. Please reopen if the problem still occurs.