Bug 283731 - [target] Remove target state dependence on preferences
Summary: [target] Remove target state dependence on preferences
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.4 M2   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL: http://wiki.eclipse.org/PDE/4.4Target...
Whiteboard:
Keywords: noteworthy
: 284875 (view as bug list)
Depends on:
Blocks: 159072 284875 296076 414255 415170
  Show dependency tree
 
Reported: 2009-07-16 12:36 EDT by Curtis Windatt CLA
Modified: 2014-07-07 06:47 EDT (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Windatt CLA 2009-07-16 12:36:36 EDT
Currently the target platform is saved as preferences.  In 3.5 the new target story adds in additional information to find and load target definitions, but the definitions still needed to be stored as preferences to be used.

In 3.6 we will look at eliminating these preferences.  Instead we will create a target model based on a target definition.  This model provides all the information that the preferences did and more.

This is a required step for multiple target platforms per workspace (bug 159072).  It will simplify the code and allow much greater flexibility in how the active target platform is created.

There is a risk that people are setting these preference manually, which will be broken.  However the preferences are internal and we will try to continue to migrate people from preference settings to target definitions.
Comment 1 Chris Aniszczyk CLA 2009-07-16 12:37:52 EDT
+1, this is in the right direction
Comment 2 Curtis Windatt CLA 2009-07-28 11:14:01 EDT
Planned for M2.
Comment 3 Curtis Windatt CLA 2009-08-25 17:47:31 EDT
Concentrating on bug 287619 first.
Comment 4 Curtis Windatt CLA 2010-01-28 13:56:53 EST
Removing milestone.  Bug 287619 isn't getting fixed for 3.6.  The work for that bug in the target_api_changes branch deprecates a number of preferences.
Comment 5 Curtis Windatt CLA 2010-08-20 16:17:52 EDT
Doesn't look like this will happen anytime soon.  It is a large and risky change.
Comment 6 Curtis Windatt CLA 2013-05-10 13:33:10 EDT
Marking for consideration in 4.4.  If we are changing the model creation code to remove support for pre-osgi plug-ins (Bug 407765), it would be a good time to look at removing the use of preferences.
Comment 7 Curtis Windatt CLA 2013-06-12 15:20:45 EDT
Similar to API tools bug 405494 we also want to be able to recognize when target content changes on disk.
Comment 8 Curtis Windatt CLA 2013-07-11 15:41:15 EDT
There is a new tracing option org.eclipse.pde.core/model which outputs the time taken to initialize the models (Bug 412795).  Mike, please turn this option on and let me know what kind of numbers you are getting.

The first part of the changeover will probably hurt performance as we'll be loading the manifest content twice.  When we can avoid the duplication, we can see what the performance impact is.
Comment 9 Curtis Windatt CLA 2013-07-18 14:06:31 EDT
The performance hit has not been as significant as I expected, no more than a second or two.  p2 targets were very painful, but this was because they marked themselves as dirty on startup, causing the cached profile to be skipped and remote repositories pinged.  Correcting this problem reduces the performance hit on p2 targets to < 100ms.  We can still look at ways to avoid reading the manifests more than once.  There is also a performance gain when interacting with the target platform (target pref page, export target, etc.) as the target will already be resolved.

If we make access to the active target be API, we should consider how bug 392652 will be affected.
Comment 10 Curtis Windatt CLA 2013-08-29 18:27:45 EDT
http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=b2c8660a932ffcbd66beb832b8869be53bd62099
Pushed major changes to master. Assuming this doesn't cause any regressions I will mark this bug as fixed and open new enhancement requests.

More details on what I changed and what I plan to change are available on a wiki:
http://wiki.eclipse.org/PDE/4.4TargetChanges
Comment 11 Curtis Windatt CLA 2013-08-30 09:32:43 EDT
download.eclipse.org/eclipse/downloads/drops4/I20130829-2000/testresults/html/org.eclipse.pde.ui.tests_win32.win32.x86_7.0.html
46 failures that definitely are related to this change.  All the tests pass locally.  Which could indicate we aren't handling the transition of of old preferences correctly.
Comment 12 Curtis Windatt CLA 2013-08-30 12:38:32 EDT
(In reply to comment #11)
> download.eclipse.org/eclipse/downloads/drops4/I20130829-2000/testresults/
> html/org.eclipse.pde.ui.tests_win32.win32.x86_7.0.html
> 46 failures that definitely are related to this change.  All the tests pass
> locally.  Which could indicate we aren't handling the transition of of old
> preferences correctly.

p2 also had a lot of test failures because of jar signer issues (they show up in our logs as well).  I noticed though that some of the IUBundleContainer tests do not reset the target platform back to the default if they fail an assertion.  Seems likely that the signing issue caused one test to fail but the target platform was never reset.

http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=3459823e88634531c365ce2be53d8d27b2d235e3
Comment 13 Curtis Windatt CLA 2013-09-03 17:15:09 EDT
With the test fix, only IUBundleContainerTests are failing which mirror problems in the p2 tests.  Marking this bug as fixed.  I will open new bugs for additional work items as specified on the wiki.
Comment 14 Curtis Windatt CLA 2013-09-03 17:17:22 EDT
*** Bug 284875 has been marked as a duplicate of this bug. ***
Comment 15 Gunnar Wagenknecht CLA 2014-07-07 06:47:48 EDT
Curtis, I believe the last commit caused a regression with resolution of target platforms. Please see bug 439011.