Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to trim down application size?
How to trim down application size? [message #504052] Wed, 16 December 2009 22:55 Go to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Hi,
Today I deployed for the first time my application.
It is far from complete, even though is not exactly trivial.
The size of the resulting directory (*excluding* the repository subdir) is well above 27MB.
It seems a bit steep for an application with one Perspective, two EditParts and one handful of ViewParts.
Am I linking in the whole universe or these numbers are normal?
How can I reduce (if possible at all) the size of this beast?

The heavyweights are, as expected, in the plugins subdir:
$ ls -lS
total 27521
-rw-r--r-- 1 mauro Administrators 5787493 Dec 16 22:15 com.ibm.icu_4.0.1.v20090822.jar
-rw-r--r-- 1 mauro Administrators 4070677 Dec 16 22:15 org.eclipse.ui.workbench_3.5.1.M20090826-0800a.jar
-rw-r--r-- 1 mauro Administrators 3003725 Dec 16 22:15 ag.ion.noa_2.2.1.jar
-rw-r--r-- 1 mauro Administrators 2256700 Dec 16 22:15 org.eclipse.swt.win32.win32.x86_3.5.1.v3555a.jar
-rw-r--r-- 1 mauro Administrators 2068344 Dec 16 22:15 org.eclipse.ui.ide_3.5.1.M20090826-0800.jar
-rw-r--r-- 1 mauro Administrators 1438886 Dec 16 22:15 it.condarelli.rcp.yw_1.0.0.200912162314.jar
-rw-r--r-- 1 mauro Administrators 1300581 Dec 16 22:15 org.apache.xerces_2.9.0.v200909240008.jar
-rw-r--r-- 1 mauro Administrators 1125860 Dec 16 22:15 org.eclipse.osgi_3.5.1.R35x_v20090827.jar
-rw-r--r-- 1 mauro Administrators 1057998 Dec 16 22:15 org.eclipse.jface_3.5.1.M20090826-0800.jar
-rw-r--r-- 1 mauro Administrators  970384 Dec 16 22:15 org.eclipse.jface.text_3.5.1.r351_v20090708-0800.jar
-rw-r--r-- 1 mauro Administrators  296330 Dec 16 22:15 org.eclipse.ui.forms_3.4.1.v20090714_35x.jar
-rw-r--r-- 1 mauro Administrators  292012 Dec 16 22:15 org.apache.xml.serializer_2.7.1.v200902170519.jar
-rw-r--r-- 1 mauro Administrators  283349 Dec 16 22:15 org.eclipse.core.databinding.observable_1.2.0.M20090902-0800.jar
-rw-r--r-- 1 mauro Administrators  263837 Dec 16 22:15 org.eclipse.jface.databinding_1.3.1.M20090826-0800.jar
-rw-r--r-- 1 mauro Administrators  245732 Dec 16 22:15 org.eclipse.text_3.5.0.v20090513-2000.jar
-rw-r--r-- 1 mauro Administrators  236808 Dec 16 22:15 javax.xml_1.3.4.v200902170245.jar
-rw-r--r-- 1 mauro Administrators  218339 Dec 16 22:15 org.eclipse.help_3.4.1.v20090805_35x.jar
-rw-r--r-- 1 mauro Administrators  203095 Dec 16 22:15 org.eclipse.core.databinding_1.2.0.M20090819-0800.jar
-rw-r--r-- 1 mauro Administrators  176643 Dec 16 22:15 org.eclipse.core.databinding.property_1.2.0.M20090819-0800.jar
...

My application is "it.condarelli.rcp.yw".

I tried searching, but I didn't find anything relevant.
OTOH several applications advertised as based on eclipse RCP have a much smaller footprint, so I suspect I'm doing something not quite right.
In particular the topmost item suggests I might be pulling in even Klingon and Sindarin codepages.

Thanks in Advance
Mauro
Re: How to trim down application size? [message #505910 is a reply to message #504052] Tue, 05 January 2010 14:53 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Are you using org.eclipse.ui.ide? If not, get rid of it (it contains
mostly code to work with core.resources, which you haven't included).
Are you using org.eclipse.help? And org.eclipse.text, that's the text
editor support.

As for com.ibm.icu, if you don't need the i18n support you can replace
it with com.ibm.icu.base (a plugin listed on the
http://download.eclipse.org/eclipse/downloads/drops/R-3.5.1- 200909170800/index.php
page, for example).

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: How to trim down application size? [message #539799 is a reply to message #505910] Sun, 13 June 2010 12:44 Go to previous messageGo to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
On 05/01/2010 15.53, Paul Webster wrote:
> Are you using org.eclipse.ui.ide? If not, get rid of it (it contains
> mostly code to work with core.resources, which you haven't included).
> Are you using org.eclipse.help? And org.eclipse.text, that's the text
> editor support.
>
> As for com.ibm.icu, if you don't need the i18n support you can replace
> it with com.ibm.icu.base (a plugin listed on the
> http://download.eclipse.org/eclipse/downloads/drops/R-3.5.1- 200909170800/index.php
> page, for example).
>
> PW
>
I have an EMF model. Does it count as Resource?
I do *not* have a workspace, just I just open a model file in the filesystem.

I tried getting rid of help, but I got the error:

Cannot complete the install because one or more required items could not be found.

Software being installed: Writer Application 1.0.0 (it.condarelli.writer 1.0.0)

Missing requirement: Workbench 3.5.2.M20100113-0800 (org.eclipse.ui.workbench 3.5.2.M20100113-0800) requires 'bundle org.eclipse.help [3.2.0,4.0.0)' but it could not be found

Cannot satisfy dependency:

From: Writer Application 1.0.0 (it.condarelli.writer 1.0.0)

To: org.eclipse.ui.workbench [3.5.2.M20100113-0800]

Is there an "approved Way" to find out what can be deleted from dependencies?

The automated Writer.product->Dependencies->Add Required Plug-ins pulls in a lot of things obviously not needed.

Is there something better available?

TiA
Mauro
Re: How to trim down application size? [message #540102 is a reply to message #539799] Mon, 14 June 2010 22:03 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Mauro Condarelli wrote:

> I have an EMF model. Does it count as Resource?
> I do *not* have a workspace, just I just open a model file in the filesystem.

No, I'm just curious why you have org.eclipse.ui.ide in there. Remove
it if you can, it's for providing workbench services that deal with
IResources (the org.eclipse.core.resources plugin). That's for
workspaces, which you don't have.

A quick glance through the original list and it looks like the only
other thing you can do is to replace com.ibm.icu with com.ibm.icu.base
(so it is significantly smaller).

You might be right, as long as you use org.eclipse.ui.workbench you
can't get rid of help.


Later,
PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: How to trim down application size? [message #540159 is a reply to message #540102] Tue, 15 June 2010 07:48 Go to previous messageGo to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
On 15/06/2010 0.03, Paul Webster wrote:
> Mauro Condarelli wrote:
>
>> I have an EMF model. Does it count as Resource?
>> I do *not* have a workspace, just I just open a model file in the
>> filesystem.
>
> No, I'm just curious why you have org.eclipse.ui.ide in there. Remove it
> if you can, it's for providing workbench services that deal with
> IResources (the org.eclipse.core.resources plugin). That's for
> workspaces, which you don't have.

The culprit was usage of FileStoreEditorInput which is in
org.eclipse.ui.ide. (why????)
I wrote my own LocalEditorInput/LocalEditorInputFactory and I managed to
get rid of ide (almost).

>
> A quick glance through the original list and it looks like the only
> other thing you can do is to replace com.ibm.icu with com.ibm.icu.base
> (so it is significantly smaller).

My current dependencies for my plugin is:

it.condarelli.writer.model,
org.eclipse.core.runtime,
org.eclipse.ui,
org.eclipse.jface.databinding,
org.eclipse.emf.databinding,
org.eclipse.ui.forms,
org.eclipse.core.filesystem,
org.eclipse.core.databinding.property,
org.eclipse.jface.text,
org.eclipse.ui.editors,
org.eclipse.nebula.widgets.ganttchart

Unfortunately the dependencies for the whole product (trimmed down by
hand, the automated dependency generator produces a *much* larger set) is:

<plugin id="com.ibm.icu"/>
<plugin id="it.condarelli.writer.model"/>
<plugin id="org.eclipse.compare"/>
<plugin id="org.eclipse.compare.core"/>
<plugin id="org.eclipse.core.commands"/>
<plugin id="org.eclipse.core.contenttype"/>
<plugin id="org.eclipse.core.databinding"/>
<plugin id="org.eclipse.core.databinding.observable"/>
<plugin id="org.eclipse.core.databinding.property"/>
<plugin id="org.eclipse.core.expressions"/>
<plugin id="org.eclipse.core.filebuffers"/>
<plugin id="org.eclipse.core.filesystem"/>
<plugin id="org.eclipse.core.filesystem.win32.x86" fragment="true"/>
<plugin id="org.eclipse.core.jobs"/>
<plugin id="org.eclipse.core.resources"/>
<plugin id="org.eclipse.core.resources.compatibility" fragment="true"/>
<plugin id="org.eclipse.core.resources.win32.x86" fragment="true"/>
<plugin id="org.eclipse.core.runtime"/>
<plugin id="org.eclipse.core.runtime.compatibility.registry"
fragment="true"/>
<plugin id="org.eclipse.core.variables"/>
<plugin id="org.eclipse.ecf"/>
<plugin id="org.eclipse.ecf.filetransfer"/>
<plugin id="org.eclipse.ecf.identity"/>
<plugin id="org.eclipse.ecf.provider.filetransfer"/>
<plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
<plugin id="org.eclipse.ecf.ssl" fragment="true"/>
<plugin id="org.eclipse.emf.common"/>
<plugin id="org.eclipse.emf.databinding"/>
<plugin id="org.eclipse.emf.ecore"/>
<plugin id="org.eclipse.emf.ecore.xmi"/>
<plugin id="org.eclipse.equinox.app"/>
<plugin id="org.eclipse.equinox.common"/>
<plugin id="org.eclipse.equinox.p2.artifact.repository"/>
<plugin id="org.eclipse.equinox.p2.core"/>
<plugin id="org.eclipse.equinox.p2.engine"/>
<plugin id="org.eclipse.equinox.p2.jarprocessor"/>
<plugin id="org.eclipse.equinox.p2.metadata"/>
<plugin id="org.eclipse.equinox.p2.metadata.repository"/>
<plugin id="org.eclipse.equinox.p2.repository"/>
<plugin id="org.eclipse.equinox.preferences"/>
<plugin id="org.eclipse.equinox.registry"/>
<plugin id="org.eclipse.equinox.security"/>
<plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
<plugin id="org.eclipse.help"/>
<plugin id="org.eclipse.jface"/>
<plugin id="org.eclipse.jface.databinding"/>
<plugin id="org.eclipse.jface.text"/>
<plugin id="org.eclipse.nebula.widgets.ganttchart"/>
<plugin id="org.eclipse.osgi"/>
<plugin id="org.eclipse.osgi.services"/>
<plugin id="org.eclipse.swt"/>
<plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
<plugin id="org.eclipse.text"/>
<plugin id="org.eclipse.ui"/>
<plugin id="org.eclipse.ui.editors"/>
<plugin id="org.eclipse.ui.forms"/>
<plugin id="org.eclipse.ui.ide"/>
<plugin id="org.eclipse.ui.views"/>
<plugin id="org.eclipse.ui.win32" fragment="true"/>
<plugin id="org.eclipse.ui.workbench"/>
<plugin id="org.eclipse.ui.workbench.texteditor"/>
<plugin id="Writer"/>


where org.eclipse.ui.ide is back with some strange friends
(org.eclipse.ecf.*).

Two questions:

Is there any way to trim down this beast? It seems to me a refactoring
of some classes (e.g.: FileStoreEditorInput) would be beneficial for all
of us wanting to use RCP "just" as an Application Framework.

You said I should "replace com.ibm.icu with com.ibm.icu.base", but I
didn't find a way to do that. Can You tell me how to achieve that?

Many Thanks.
Mauro

>
> You might be right, as long as you use org.eclipse.ui.workbench you
> can't get rid of help.
>
>
> Later,
> PW
>
Re: How to trim down application size? [message #540223 is a reply to message #540159] Tue, 15 June 2010 12:34 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Mauro Condarelli wrote:

>
> <plugin id="com.ibm.icu"/>

The com.ibm.icu replacement, com.ibm.icu.base, is on the Eclipse SDK
download pages, like
http://download.eclipse.org/eclipse/downloads/drops/R-3.5.2- 201002111343/

>
>
> where org.eclipse.ui.ide is back with some strange friends
> (org.eclipse.ecf.*).

As long as you depend on org.eclipse.ui.ide, you will get all of
core.resources, p2, and p2 pulls in ecf.

>
> Two questions:
>
> Is there any way to trim down this beast? It seems to me a refactoring
> of some classes (e.g.: FileStoreEditorInput) would be beneficial for all
> of us wanting to use RCP "just" as an Application Framework.

Get rid of org.eclipse.ui.ide dependencies. That's the only way. If
you've copied out the LocalEditorInput/LocalEditorInputFactory code,
what else do you depend on?


Later,
PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:Menu contribution to a nested editor
Next Topic:One Handler, multiple WorkbenchWindows
Goto Forum:
  


Current Time: Fri Apr 19 06:01:39 GMT 2024

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

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

Back to the top