Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Eclipse StartUp Sequence
Eclipse StartUp Sequence [message #88287] Fri, 18 May 2007 00:50 Go to next message
Eclipse UserFriend
Originally posted by: matthias.betz.uni-siegen.de

Hello together,

I'm currently working at the possibilities of the underlying
OSGi-Features and the install- and configuration-areas of the
Eclispe-RCP in order to work with the dynamic aspects of the RCP
PlugIn-Management.

Is there a graphical or textual documentation of the startup-sequence of
the RCP existing in the Web? I tried Google but didn't got a result :-(

Do you guys know something about it?

Thanks in forward,

Matthias
Re: Eclipse StartUp Sequence [message #88557 is a reply to message #88287] Tue, 22 May 2007 01:19 Go to previous messageGo to next message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 333
Registered: July 2009
Location: Ottawa
Senior Member
Which aspect are you interested in?
When you double click on the eclipse.exe, a org.eclipse.equinox.launcher
jar is being discovered from the plugsins folder and is being executed (aka
org.eclipse.equinox.launcher.Main). This Main discover org.eclipse.equinox
loads it and starts it. After that osgi is given control. When osgi starts
it first restores the content from the previous run from caches,
reconciliates the lists of bundles contained on the osgi.bundles property,
and then raise the start level. This causes the bundles to be started again.

HTH

PaScaL

"Matthias Betz" <matthias.betz@uni-siegen.de> wrote in message
news:f2itfa$l0k$1@build.eclipse.org...
> Hello together,
>
> I'm currently working at the possibilities of the underlying OSGi-Features
> and the install- and configuration-areas of the Eclispe-RCP in order to
> work with the dynamic aspects of the RCP PlugIn-Management.
>
> Is there a graphical or textual documentation of the startup-sequence of
> the RCP existing in the Web? I tried Google but didn't got a result :-(
>
> Do you guys know something about it?
>
> Thanks in forward,
>
> Matthias
Re: Eclipse StartUp Sequence [message #132995 is a reply to message #88557] Sun, 14 June 2009 11:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jmordax.terra.es

Pascal Rapicault wrote:
> Which aspect are you interested in?
> When you double click on the eclipse.exe, a org.eclipse.equinox.launcher
> jar is being discovered from the plugsins folder and is being executed (aka
> org.eclipse.equinox.launcher.Main). This Main discover org.eclipse.equinox
> loads it and starts it. After that osgi is given control. When osgi starts
> it first restores the content from the previous run from caches,
> reconciliates the lists of bundles contained on the osgi.bundles property,
> and then raise the start level. This causes the bundles to be started again.
>
> HTH
>
> PaScaL
Hi Pascal, really interesting stuff. I was not able to find such startup
process in Eclipse docs.

I was looking for such info because I was observing an interesting
behavior when Eclipse is starting up (to be more precise I am playing
with 3.4.2). It seems the time it consumes since I double click
eclipse.exe and the dialog asking for a workspace appears is really
bigger the first time I execute it. Since that first execution, the next
ones are really faster. But then, if I restart the machine, again the
first time will consume a lot.

Do you know which step is longer when it is executed the first time?

What is touched after a machine reboot that will affect the startup
process of Eclipse?

Is it possible to avoid that "time consuming" process and reuse whatever
info and/or cache from the previous machine session?

Thanks a lot,

Chemi.
Re: Eclipse StartUp Sequence [message #133024 is a reply to message #132995] Sun, 14 June 2009 16:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jmordax.terra.es

Chemi wrote:
> Pascal Rapicault wrote:
>> Which aspect are you interested in?
>> When you double click on the eclipse.exe, a
>> org.eclipse.equinox.launcher jar is being discovered from the
>> plugsins folder and is being executed (aka
>> org.eclipse.equinox.launcher.Main). This Main discover
>> org.eclipse.equinox loads it and starts it. After that osgi is given
>> control. When osgi starts it first restores the content from the
>> previous run from caches, reconciliates the lists of bundles
>> contained on the osgi.bundles property, and then raise the start
>> level. This causes the bundles to be started again.
>>
>> HTH
>>
>> PaScaL
> Hi Pascal, really interesting stuff. I was not able to find such
> startup process in Eclipse docs.
>
> I was looking for such info because I was observing an interesting
> behavior when Eclipse is starting up (to be more precise I am playing
> with 3.4.2). It seems the time it consumes since I double click
> eclipse.exe and the dialog asking for a workspace appears is really
> bigger the first time I execute it. Since that first execution, the
> next ones are really faster. But then, if I restart the machine, again
> the first time will consume a lot.
>
> Do you know which step is longer when it is executed the first time?
>
> What is touched after a machine reboot that will affect the startup
> process of Eclipse?
>
> Is it possible to avoid that "time consuming" process and reuse
> whatever info and/or cache from the previous machine session?
>
> Thanks a lot,
>
> Chemi.
It seems disk fragmentation affects a lot. After several executions of
Windows Defragmentation Tool the startup process improved a lot.

Regards,

Chemi.
Re: Eclipse StartUp Sequence [message #133112 is a reply to message #132995] Mon, 15 June 2009 15:14 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
Chemi wrote:
> Hi Pascal, really interesting stuff. I was not able to find such startup
> process in Eclipse docs.
>
> I was looking for such info because I was observing an interesting
> behavior when Eclipse is starting up (to be more precise I am playing
> with 3.4.2). It seems the time it consumes since I double click
> eclipse.exe and the dialog asking for a workspace appears is really
> bigger the first time I execute it. Since that first execution, the next
> ones are really faster. But then, if I restart the machine, again the
> first time will consume a lot.
>
> Do you know which step is longer when it is executed the first time?
>
> What is touched after a machine reboot that will affect the startup
> process of Eclipse?
>
> Is it possible to avoid that "time consuming" process and reuse whatever
> info and/or cache from the previous machine session?
>
> Thanks a lot,
>
> Chemi.

To be a bit more specific about the startup sequence early on, for a
product that is properly set up, it goes something like:
1) eclipse.exe starts
2) the native launcher code finds the splash screen and displays it
3) The native launcher code finds the jre and starts it
4) Once java is running, the main class from
org.eclipse.equinox.launcher is started
5) The main class finds osgi and starts it.
6) Once the OSGi framework is completely up and running, it finds the
eclipse Application and starts it.
7) In a normal Eclipse, the application is the IDE workbench, This is
when the workspace chooser dialog is displayed.

The parts that will generally take longer are (3) - starting the vm, and
(5) starting the OSGi framework.

Generally the OS is going to have a disk cache, which will be empty when
you first boot up. Both vm startup and OSGi startup are going to be
doing a lot of disk access and having a "warm" cache speeds that up. VM
startup time in particular is going be greatly affected by whether or
not system dlls it needs have already been loaded and are in the cache.
Re: Eclipse StartUp Sequence [message #133134 is a reply to message #133112] Mon, 15 June 2009 16:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jmordax.terra.es

Andrew Niefer wrote:
> To be a bit more specific about the startup sequence early on, for a
> product that is properly set up, it goes something like:
> 1) eclipse.exe starts
> 2) the native launcher code finds the splash screen and displays it
> 3) The native launcher code finds the jre and starts it
> 4) Once java is running, the main class from
> org.eclipse.equinox.launcher is started
> 5) The main class finds osgi and starts it.
> 6) Once the OSGi framework is completely up and running, it finds the
> eclipse Application and starts it.
> 7) In a normal Eclipse, the application is the IDE workbench, This is
> when the workspace chooser dialog is displayed.
>
> The parts that will generally take longer are (3) - starting the vm,
> and (5) starting the OSGi framework.
>
> Generally the OS is going to have a disk cache, which will be empty
> when you first boot up. Both vm startup and OSGi startup are going to
> be doing a lot of disk access and having a "warm" cache speeds that
> up. VM startup time in particular is going be greatly affected by
> whether or not system dlls it needs have already been loaded and are
> in the cache.
Thanks Andrew! Just something else... when you say OSGi startup is going
to a lot of disk accesses... what is it doing? Do you know the detailed
steps too?
I would like to understand if number of existing plug-ins for example
will impact in this number of accesses or not. Or anything like that.

Once again, thanks a lot,

Chemi.
Re: Eclipse StartUp Sequence [message #133199 is a reply to message #133134] Tue, 16 June 2009 18:55 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
Chemi wrote:
> Thanks Andrew! Just something else... when you say OSGi startup is going
> to a lot of disk accesses... what is it doing? Do you know the detailed
> steps too?
> I would like to understand if number of existing plug-ins for example
> will impact in this number of accesses or not. Or anything like that.
>
> Once again, thanks a lot,
>
> Chemi.

As mentioned earlier, osgi does keep caches. So in the case where the
cache is good, all that has to happen is loading .jar files on demand as
we need to load classes/resources out of them. So the number of
plug-ins doesn't really matter, unless they are all try to start early.

However, if there are no caches, (ie you ran with -clean, or this is the
first startup for that install), then OSGi needs to read the manifest
files from all the bundles that are installed. This will of course be
linear with the number of bundles.

-Andrew
Re: Eclipse StartUp Sequence [message #133224 is a reply to message #133199] Wed, 17 June 2009 06:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jmordax.terra.es

Andrew Niefer wrote:
> As mentioned earlier, osgi does keep caches. So in the case where the
> cache is good, all that has to happen is loading .jar files on demand
> as we need to load classes/resources out of them. So the number of
> plug-ins doesn't really matter, unless they are all try to start early.
>
> However, if there are no caches, (ie you ran with -clean, or this is
> the first startup for that install), then OSGi needs to read the
> manifest files from all the bundles that are installed. This will of
> course be linear with the number of bundles.
>
> -Andrew
Understood... do you know the location of those OSGi caches?
Is there any other reason why an OSGi cache could be invalidated? I
mean, other than -clean option.

Thanks a lot,

Chemi.
Re: Eclipse StartUp Sequence [message #133326 is a reply to message #133224] Wed, 17 June 2009 19:26 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
Chemi wrote:
> Andrew Niefer wrote:
>> As mentioned earlier, osgi does keep caches. So in the case where the
>> cache is good, all that has to happen is loading .jar files on demand
>> as we need to load classes/resources out of them. So the number of
>> plug-ins doesn't really matter, unless they are all try to start early.
>>
>> However, if there are no caches, (ie you ran with -clean, or this is
>> the first startup for that install), then OSGi needs to read the
>> manifest files from all the bundles that are installed. This will of
>> course be linear with the number of bundles.
>>
>> -Andrew
> Understood... do you know the location of those OSGi caches?
> Is there any other reason why an OSGi cache could be invalidated? I
> mean, other than -clean option.
>
> Thanks a lot,
>
> Chemi.

I believe the osgi cache files are under
eclipse/configuration/org.eclipse.osgi (.bundledata, .lazy, .state), and
also registry caches under configuration/org.eclipse.core.runtime.

The osgi caches could be invalidated by:
1) tampering with the cache files themselves, changing timestamps on the
cache files
2) changing the storage hooks in the system
(http://wiki.eclipse.org/Adaptor_Hooks)
3) changing timestamps of the jars/manifests (disable this with
"osgi.checkConfiguration")
4) Any custom storage hooks could choose to throw an exception on
StorageHook.validate()


I expect similar things would invalidate the registry cache.

-Andrew
Re: Eclipse StartUp Sequence [message #541380 is a reply to message #133112] Sun, 20 June 2010 16:50 Go to previous message
maarten meijer is currently offline maarten meijerFriend
Messages: 146
Registered: July 2009
Senior Member
Andrew Niefer schreef:
> To be a bit more specific about the startup sequence early on, for a
> product that is properly set up, it goes something like:
> 1) eclipse.exe starts
> 2) the native launcher code finds the splash screen and displays it
> 3) The native launcher code finds the jre and starts it
> 4) Once java is running, the main class from
> org.eclipse.equinox.launcher is started
> 5) The main class finds osgi and starts it.
> 6) Once the OSGi framework is completely up and running, it finds the
> eclipse Application and starts it.
> 7) In a normal Eclipse, the application is the IDE workbench, This is
> when the workspace chooser dialog is displayed.

So when I launch eclipse or an RCP application with argument -noExit and
I quit, I will be at the same situation as after step 5) because osgi is
alive and some bundles are loaded, but the application is stopped.

My question is can I then enter a command at the osgi terminal to
restart eclipse?

Maarten Meijer
Previous Topic:error updating equinox.weaving installing spring tools
Next Topic:RCP App Startup: why STARTING is the status of my 'unused' plugin?
Goto Forum:
  


Current Time: Thu Apr 25 00:58:48 GMT 2024

Powered by FUDForum. Page generated in 0.04510 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top