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

Bug 327010

Summary: Marketplace Client shouldn't hang UI whilst doing lookups
Product: [Technology] MPC Reporter: Alex Blewitt <alex.blewitt>
Component: wizardAssignee: Project Inbox <mpc.wizard-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3    
Version: unspecified   
Target Milestone: 1.4.2   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Alex Blewitt CLA 2010-10-05 10:05:51 EDT
Build Identifier: 1.0.1 (Eclipse 3.6.1)

When the marketplace client opens, it does a network request to download data. However, it does this in the foreground and blocks the application. It would be better if this finished downloading in the background, then updated the display, instead of hanging the user's experience until it does something. The same is true of the results of the 'search' screen.

Reproducible: Always

Steps to Reproduce:
1. Use a slow (or simulated slow) network connection
2. Open the 'marketplace client' wizard
3. Have a cup of tea (or coffee, for preference) whilst you wait for things to be downloaded and you can do nothing until it finishes.
Comment 1 David Green CLA 2010-11-01 13:27:28 EDT
Thanks for the bug.  The MPC client should be doing all network activity in the background.  Can you attach a screenshot showing when the problem occurs?
Comment 2 Alex Blewitt CLA 2010-11-01 13:59:58 EDT
When it is populating the initial list of projects or the result of the search it seems to hang. I wonder if the UI is trying to evaluate the result of the list causing a lazy load to hang until the list is populated.
Comment 3 Alex Blewitt CLA 2010-11-01 14:11:13 EDT
To clarify ... this is happening between 'Help->Eclipse Marketplace...' and the dialog being shown for the first time. The initial screen comes up with a grey list, there's lots of 'downloading...' activity, and only once that has finished is the UI shown. You should be able to simulate this with a throttled network connection to the outside world rather than a wired one, or putting something like ipfw to do traffic shaping.

http://www.freebsd-howto.com/HOWTO/Ipfw-HOWTO
Comment 4 Alex Blewitt CLA 2010-11-01 14:12:51 EDT
The message shown is "Retreiving listing: Fetching..." in the dialog bit at the bottom, if that's any help.
Comment 5 Alex Blewitt CLA 2010-11-01 14:27:33 EDT
Put a breakpoint in processRequest in the DefaultMarketplaceService, fire up a new Eclipse install, and witness as the UI is hung. The problem is that the Eclipse Marketplace dialog is modal (don't know why it needs to be modal in the first place; any thoughts?) which of course blocks everything else.

The thread stack takes you straght to the scene of the crime; the whole thing comes from ModalContext$ModalContextThread.run(), presumably because of the modal dialog. It looks like it's doing the MarketPlaceCatalog.performDiscovery() call chain.
Comment 6 Alex Blewitt CLA 2010-11-01 14:27:34 EDT
Created attachment 182167 [details]
mylyn/context/zip
Comment 7 Carsten Reckord CLA 2015-11-24 11:29:04 EST
There have been some important changes in this regard across the last few MPC releases:

1) all queries happen outside the UI thread, including marketplace queries, image downloads etc
2) the MPC dialog is now non-modal

However, the dialog itself still waits until all information has been fetched before it lets you proceed. Changing that would require a major rewrite of the whole MPC UI and I can't see that happen in the foreseeable future. I believe that the improvements above are a good solutions though. So I'm going ahead and closing this as fixed. But feel free to reopen if you have specific suggestions how we could improve this further.