Bug 287144 - Provisioning history influences Eclipse startup.
Summary: Provisioning history influences Eclipse startup.
Status: RESOLVED INVALID
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks: 251561
  Show dependency tree
 
Reported: 2009-08-20 02:43 EDT by Krzysztof Daniel CLA
Modified: 2009-09-03 11:49 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Daniel CLA 2009-08-20 02:43:35 EDT
This bug report is based on support observation. Support very often has to deploy test plug-ins into dropins folder.

Every new deploy causes Eclipse based start-up to take more time.
Removing almost all .profile files reduces the start-up time from 20 minutes to 2 (90%!).

This observation indicates that dropins reconciler reads all profiles. Can this be optimized?
Comment 1 Krzysztof Daniel CLA 2009-08-31 14:27:42 EDT
original bug is reopened :-)

*** This bug has been marked as a duplicate of bug 251561 ***
Comment 2 John Arthorne CLA 2009-08-31 14:52:30 EDT
Actually I think this bug is interesting to remain open as a separate bug. The history might turn out to be the main cause of slowness everyone is seeing, but there may be other causes that would need addressing separately. I've added this bug as a dependency on bug 251561 instead.
Comment 3 Krzysztof Daniel CLA 2009-09-01 04:27:06 EDT
I have tried to find out who reads profiles, but I havent got any significant results - debugger stops in Parser#parse only once during startup.

I think I need a few hints to perform further investigation.
Comment 4 Pascal Rapicault CLA 2009-09-01 07:53:10 EDT
I would recommend looking at SimpleProfileRegistry around getProfileMap(). At some point in this code we go over all the profiles to find the latest one but we should not load them. 
Otherwise I would recommend using a Profiler to see where the actual time is going.
Comment 5 Krzysztof Daniel CLA 2009-09-02 06:17:06 EDT
Update on inital bug report - it is necessary to remove *all* not *almost all* profile files.
Comment 6 Krzysztof Daniel CLA 2009-09-02 06:37:43 EDT
Launching (relatively clean) RAD until workspace selection dialog appears:

no changes in dropins: 3 seconds
small changes in dropins: 90 seconds
small changes in dropins + removed all profile files: 8 seconds.

This raises several questions:

1. Is it safe to delete all profile files?
Ok, I already know it is not. Is there any way to make P2 to recreate profiles?

2. Why everything works so fast without .profile?
Comment 7 Pascal Rapicault CLA 2009-09-02 08:32:02 EDT
> 1. Is it safe to delete all profile files?
  No.
>Is there any way to make P2 to recreate profiles?
  No.

>2. Why everything works so fast without .profile? 
  Could you please do some profiling to find out?
Comment 8 Pascal Rapicault CLA 2009-09-02 08:32:19 EDT
btw, good findings!
Comment 9 Krzysztof Daniel CLA 2009-09-03 05:10:05 EDT
I hate profiling, I prefer javacores.

Ok, it appears that support also edits bundles.info to add there updated plug-in from dropins.

Deleting .profile files simply disables P2. That is the whole truth. OSGI starts and loads bundles.info. That's the whole magic.

During regular P2 startup a lot of javacores is taken in native methods:
SiteListener.contains which refers to File. and:
* Win32FileSystem.normalize
* WinNTFileSystem.getLastModifiedTime

I do not think we can get a lot of improvements here.
Comment 10 John Arthorne CLA 2009-09-03 11:49:34 EDT
Yes, of course disabling p2 completely will be faster.