Home » Eclipse Projects » Remote Application Platform (RAP) » Switching Views taking a long time on first attempt to load that view.(Switch between 2 views, takes around 3+ seconds the first time it loads.)
Switching Views taking a long time on first attempt to load that view. [message #902444] |
Fri, 17 August 2012 15:24 |
George R Malary Messages: 36 Registered: March 2012 Location: New Jersey |
Member |
|
|
Hi,
I have 2 pretty simple views, with tables that load data. The loading of the data happens in an Eclipse Job outside the UI Thread. When I first login, the first view displays fine, and data is loaded. When I try to switch to the second view, the tab for the view activates, but it takes up to 5 seconds for the view to load. After that, you can switch back and forth between the views in a normal manner.
I have tried commenting out the code for the data generation jobs, which happen on partActivated(), and also commented out code for saving dirty state which happen in partDeactivated(). I still have a long delay when switching views the first time.
The views dont have any fancy code really, just a TableViewer with some Action toolbars, and the Eclipse Jobs to load the data.
Any idea what could be causing this? Is this normal behavior?
Regards,
George
|
|
| |
Re: Switching Views taking a long time on first attempt to load that view. [message #902556 is a reply to message #902464] |
Sat, 18 August 2012 11:54 |
Rüdiger Herrmann Messages: 581 Registered: July 2009 |
Senior Member |
|
|
George,
what exactly do you mean with "switch view"? Are you opening a vie wfor
the first time?
Anyhow, this shouldn't take seconds - views usually open almost
instantly. How many widgets does your view create initially?
Regards,
Rüdiger
On 17.08.2012 19:59, George R Malary wrote:
> I stripped out all jobs, and only left widget creations, and listener
> attachments, and it still seems to take a few seconds to switch views.
> I come to the conclusion that lag is normal, for creation of objects and
> listeners, and that all we can do is block UI actions until load is
> complete.--
Rüdiger Herrmann
http://codeaffine.com
|
|
| | |
Re: Switching Views taking a long time on first attempt to load that view. [message #902760 is a reply to message #902576] |
Mon, 20 August 2012 10:17 |
Rüdiger Herrmann Messages: 581 Registered: July 2009 |
Senior Member |
|
|
to track down the performance problem in detail you should use a
profiler like YourKit or VisualVM.
But usually, it's the number of widgets (table items are also widgets)
that slows down the UI creation.
Hence, to speed up the UI createion it is best to limit the number of
widgets that are initially shown. Did you try to limit the number of
table items or use a VIRTUAL table? Do you crate the details composite
on demand?
If you think it is the SelectionProvider, did you disable the
SelectionProvider code and check if the delay is gone?
Regards,
Rüdiger
On 18.08.2012 16:54, George R Malary wrote:
> Yes, opening the second view for the first time is taking unusually long.
>
> I've stripped the view down, and the problen only occurs when I add a
> composite with a tableviewer. The tableviewer registers a selection
> provider.
> The view as a whole is this:
>
> The view has some actions in the toolbar. It the shows a tableviewer and
> runs an eclipse job to populate the table. Each row has an edit icon.
> When clicked, a details composite is opened. The details composute and
> tableviewer composite are in a Stack layout.
>
> So when switching from the initially loaded view, to the second view,
> thw problem seems to be happening when creating the tableviewer. I've
> added sysouts to try and see where the felays are happening, and it
> seems maybe to have to do with the selection provider, but that's just a
> guess.
>
> Regards,
--
Rüdiger Herrmann
http://codeaffine.com
|
|
| |
Goto Forum:
Current Time: Thu Jan 16 01:39:56 GMT 2025
Powered by FUDForum. Page generated in 0.03837 seconds
|