Skip to main content

Optimization

3 replies [Last post]
earamsey
Offline
Joined: 2004-04-15
Points: 0

Hello, programmers.

I read an article about optimizations and the article stated that one should NOT put source into a package well that was easy enough to do. However, it also went on to suggest that one should remove third party libraries from their packages rather than just dump it into the project. How do I do this? I am using "kXml2" parser and I can't see how to unjar it and remove it from it's package unless I get the source code and do it manually. I did notice that when my source was in a package Proguard automatically removed everything, but the midlet class, from package but according to the article all elements of the package need to be eliminated.

The reasoning behind this is that java generates a lot of overhead when handling classes that are part of a package.

Any suggests on how to remove 3rd party libraries from their packages?

Thanks,
-------
JavaME (J2ME), Java, C & C# Developer
CV: http://docs.google.com/Doc?id=dt6fqcn_51dn8gds

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
captainfreedom
Offline
Joined: 2007-01-10
Points: 0

I can't see how it would make any difference to java whether classes are in a package or not.

Thomas Landspurg

Bur proguard do this automatically (removing everything from a package)
except for main classes (childs of Midlet), so you don't need to do it
manually....

What is the source article?

Thomas Landspurg
http://blog.landspurg.net

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]

Vince Batchelor

Jar files can be opened with whatever zip utility you use. Just unzip it to
a directory and delete any file it doesn't need. This is usually the
manifest file and META-INF directory. From there, just include it into your
jar like you would any other resource.

On 9/10/07, meinterest@mobileandembedded.org <
meinterest@mobileandembedded.org> wrote:
>
> Hello, programmers.
>
> I read an article about optimizations and the article stated that one
> should NOT put source into a package well that was easy enough to do.
> However, it also went on to suggest that one should remove third party
> libraries from their packages rather than just dump it into the project. How
> do I do this? I am using "kXml2" parser and I can't see how to unjar it and
> remove it from it's package unless I get the source code and do it manually.
> I did notice that when my source was in a package Proguard automatically
> removed everything, but the midlet class, from package but according to the
> article all elements of the package need to be eliminated.
>
> The reasoning behind this is that java generates a lot of overhead when
> handling classes that are part of a package.
>
> Any suggests on how to remove 3rd party libraries from their packages?
>
> Thanks,
> -------
> JavaME (J2ME), Java, C & C# Developer
> CV: http://docs.google.com/Doc?id=dt6fqcn_51dn8gds
> [Message sent by forum member 'earamsey' (earamsey)]
>
> http://forums.java.net/jive/thread.jspa?messageID=234685
>
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the
> body
> of the message "signoff KVM-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]