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

Bug 251400

Summary: [ui] "Revert Configuration" button in p2 slow and unresponsive
Product: [Eclipse Project] Equinox Reporter: Jacek Pospychala <jacek.pospychala>
Component: p2Assignee: Susan McCourt <susan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: pascal, simon_kaegi, susan
Version: unspecified   
Target Milestone: 3.5 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jacek Pospychala CLA 2008-10-20 10:17:52 EDT
I have plain Eclipse 3.4.1 that I have used for 2 weeks now.
It has 12 configuration profiles in history (in p2\org.eclipse.equinox.p2.engine\profileRegistry\bootProfile.profile). I have installed 3 new features during this time.
What is problem is that whenever I enter to Help->Software Updates and on "Available Software" tab press "Revert Configuration" button it takes ages to see the dialog window with revert options. During that time user interface is freezed with "Revert Configuration" button in pressed state.

I see two problems there:
1. "Revert Configuration" could use Jobs to at least make user aware that something is going on behind the scenes
2. Is this expected for such configuration as mine (small, new install, not much changes) to take sooo long to load revert dialog? We're experiencing the same problem on IBM Eclipse 3.4 based application with ~1000 features and it takes 10-15 minutes to load revert dialog.

With a bit of help from your side, I think I should be able to help at least with problem 1. It would be really good to have this issue fixed, as it so much reminds old UpdateManager times.
Comment 1 Susan McCourt CLA 2008-10-21 14:42:09 EDT
We'll be looking at the revert workflow in 3.5M4, see also bug #216031.  Per that bug, we would be putting the snapshot list in its own page in the Installation Dialog.

Unfortunately the performance for retrieving snapshots is pretty poor.  Until this  is improved, the list will be populated using asynch list retrieval, such that you would "Pending..." in the list of snapshots until the list were available.  This will not block your work.
Comment 2 Jacek Pospychala CLA 2008-10-22 02:29:17 EDT
(In reply to comment #1)

that would be perfect!

Comment 3 Susan McCourt CLA 2008-11-25 17:07:05 EST
still plan to do something, but running out of time for M4.  Moving to M5.
Comment 4 Pascal Rapicault CLA 2008-12-09 13:21:34 EST
*** Bug 252510 has been marked as a duplicate of this bug. ***
Comment 5 Susan McCourt CLA 2008-12-09 13:26:14 EST
Note there are two different issues here:

- getting snapshot information is very slow.  Don't want to hang the UI while snapshots are being retrieved.
- once a snapshot is selected, it's possible that repos will have to be loaded to perform the revert.  (bug 252510).  We should probably put the revert itself in a job so that the UI doesn't hang.  However, note that a restart is about to happen anyway, so from a workflow point of view, letting the user keep working isn't necessarily helpful.  I want to understand why more repos have to be loaded when we just loaded them to get the snapshot info, it may be that we need to cache the repos so that the weak references don't get lost.
Comment 6 Susan McCourt CLA 2008-12-09 13:35:13 EST
See also bug 249291
Comment 7 Susan McCourt CLA 2009-01-07 19:07:38 EST
Fixed in HEAD >20090107.
Several things have happened:

- in bug 247058, the way that snapshots are enumerated and retrieved is much different, and much faster.
- in bug 216031, the revert history has moved to an "Installation History" page in the Installation Information dialog (this will soon be integrated into the about dialog).  On this page, there is a "Revert" button
- If you push "Revert" you get an immediate, cancelable progress dialog while the revert plan is being computed.  Once the revert actually starts, the operation is performed in a job and you get the expected jobs progress dialog.