Jump to content
Excelsior Forums
Sign in to follow this  
MartinP

Memory and GUI "response"

Recommended Posts

Hello.

First of all, I must say that my primary intention was to make my application independent on installed JRE - and Excelsior JET fulfills that. The other intensions were to make java applications less greedy on memory resources and more user responsive than is usual with JRE. However, in these points I'm not so sure, yet.

What is the approximate application size from which the compiled application begins to get smaller memory footprint than original java? Conserning the GUI response, I don't know how exactly put the question.

I've tested compilation of several programs, mainly of free games, they all were JARs of size bellow 1MB (including resources). The EXEs compiled and "globaly optimized" by Excelsior were usually of size about 10MB. I guess that if the original java apps were packed by a java wrapper instead (with unused parts of JRE cut off), I would get a similar disk impact. But what is more important, the memory footprint of the applications didn't change much (by 20-30% at max), neither their subjective speed (or rather slowliness).

The explanation may be that the applications were too small to see a difference; or that java is in version 1.5 already optimal; or that the applications were badly written (what to expect from free apps);... I didn't try to compile an application of size of the Eclipse IDE, but maybe only then would I notice a difference? E.g. WebSphere Application Developer takes about 3 times more RAM than Visual Studio with a project of approximately equal size. Is it reasonable to expect that after using Excelsior, the memory impact of big compiled applications will be comparable with C++ apps?

Thank you, Martin.

Share this post


Link to post
Share on other sites
The EXEs compiled and "globaly optimized" by Excelsior were usually of size about 10MB. I guess that if the original java apps were packed by a java wrapper instead (with unused parts of JRE cut off), I would get a similar disk impact

Why do you care about disk footprint? Do you develop an embedded app and try to save flash memory footprint of the target device?

If your main concern is download size, check this page:

    http://www.excelsior-usa.com/java-download-size.html

------------------

But what is more important, the memory footprint of the applications didn't change much (by 20-30% at max), neither their subjective speed (or rather slowliness).

You may fine tune the memory usage as described in this JET Knowledge Base article

  http://www.excelsior-usa.com/kb/000025.html

------------------

As for GUI responce time, it's typically better after compilation as reported by our customers. But you're right in that it's very subjective.

A quantitative evaluation of responce time is tough but it's possible. For more details, read on

  http://linux.sys-con.com/read/46901.htm

B)

Share this post


Link to post
Share on other sites
Why do you care about disk footprint? Do you develop an embedded app and try to save flash memory footprint of the target device?

No, I'm just evaluating the "looses and gains" of compiled java programs from different aspects. And if a simple 40kB command-line tool (ZipSnap21) grows to 5MB (that is 100 times), it's...worth notice. When written in C++, the tool would fit into 100kB limit. But of course, I'm not going to rewrite it :-).

Development in java is much faster and more error-prone than in C++, but the resulting applications cannot match C++ apps in GUI responsivness and memory footprint. That is why I was hoping that compiling and optimizing them could help to narrow the gap.

If your main concern is download size, check this page:

    http://www.excelsior-usa.com/java-download-size.html

Concerning the memory footprint, I've taken your advice and compiled e.g. JEdit from the list. At the first run, Excelsior is the clear winner over JRE in GUI response times, after JRE "warm-up" there is no subjective difference. But the JET compiled version takes about 40MB RAM, while the JRE version takes 30MB. Comparable PSPad editor written probably in C/C++ takes about 15MB RAM.

I wasn't able to check the download sizes because the trial version of JET expired, 5 days after installing it. I filled a bug.

Share this post


Link to post
Share on other sites
Concerning the memory footprint, I've taken your advice and compiled e.g. JEdit from the list. At the first run, Excelsior is the clear winner over JRE in GUI response times, after JRE "warm-up" there is no subjective difference

Not bad. At least removing the "warm-up" phenomena (which annoys users each time they start a Java app) makes Java closer to C++ in terms of responce time.

B)

the JET compiled version takes about 40MB RAM, while the JRE version takes 30MB.

It does not mean that the JET Runtime will necessarily take this amount of memory to run JEdit. That's just a GC policy that can be easily changed as described in this JET Knowledge Base article

  http://www.excelsior-usa.com/kb/000025.html

I wasn't able to check the download sizes because the trial version of JET expired, 5 days after installing it. I filled a bug.

Thanks. We will fix it soon.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×