Bug 222339 - [ui] D&D of old update site freezes the UI
Summary: [ui] D&D of old update site freezes the UI
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M6   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-11 21:47 EDT by Pascal Rapicault CLA
Modified: 2008-04-01 15:54 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2008-03-11 21:47:59 EDT
When I drag and drop the URL http://update.eclemma.org/ to the available features list, the UI freezes because the load seems to be taking a long time. I was wondering if it would not be best to have displayed in the available features list something like "loading repo". This way the user can still move around in the UI.
Comment 1 Pascal Rapicault CLA 2008-03-11 22:07:27 EDT
actually the same problem occurs when adding the repo through the "manage sites" dialog.
Comment 2 Susan McCourt CLA 2008-03-11 23:15:59 EDT
Believe it or not, we do not load the repo, we only validate it.
We used to do the validation asynchronously but this meant we couldn't pre-validate the URL in the add site dialog.  We had *many* complaints of different flavors about this problem....why do you let me complete if it's invalid?  etc. etc.  Note that because we let the repo factories validate, we really can't differentiate between a fast validate (bogus http: site) and a slow validate (yes, there is something there, but not quite the right format, etc.).

See  bug #204184 for full explanation, but I decided to be "just as slow" as UM and to do validation synchronously.  We actually have a better experience than UM does now.

Bottom line:  validation of sites, especially old update sites, should be faster.
After typing all this in, I realize this is a dup of #221774.

*** This bug has been marked as a duplicate of bug 221774 ***
Comment 3 Susan McCourt CLA 2008-03-12 18:12:01 EDT
reopening because Pascal said today he thinks things are much slower when a d&d operation adds a site than when it's done via the dialog.  This should not be the case.

I ran some quick tests in my workspace (some unreleased code) and I didn't see any difference.  Maybe I already had some stuff cached, though, having loaded the site previously?
Comment 4 Susan McCourt CLA 2008-03-13 17:32:13 EDT
Marking 3.4.

I now run the URL validation in a UI Job.  This still runs in the UI thread, but allows for an fast return from the d&d operation, so that you haven't locked up the source of the drag.  It also uses the workbench job error reporting to kick in, which is a bit nicer than the generic status dialog.

I will consider running this in a non-UI job later.  This would default to having progress reporting in the workbench itself, which seems to confuse most people for provisioning operations. (see bug #218186).  Also, there is prompting that often has to occur, so even a background job would have to sync back with the UI thread.  I'd like to look at these issues later once most functionality is in.  We may decide to build a p2 job family and our own specialized progress reporting inside the updates dialog.
Comment 5 Susan McCourt CLA 2008-03-26 19:29:17 EDT
I'm seeing this much more clearly while testing M6.  I think it's worse when you are actually dragging to the running Eclipse instance vs. using a workbench that's operating on a different profile (a mode I often run in to test things without screwing up my dev environment).

I just saw quite a "freeze-up" (no repainting, etc.) after dragging the test updates site to the repository list dialog.  Need to see if this is particularly worse than when adding via the dialog.
Comment 6 Susan McCourt CLA 2008-04-01 15:54:41 EDT
I believe this was fixed with all the late-breaking changes for bug #222563.
Dragging eclemma.org (or EMF site, or Mylyn sites) is now quite responsive.  It still takes some time to see the content, but the UI responds and you see the "Pending..." in the Available Features page.