8 Replies Latest reply: Jun 24, 2007 11:59 PM by EJP RSS

    Opinion on Java's performance

    800448
      Hi,

      I recently posted this blog post on the memory usage of Java.

      http://tuxychandru.blogspot.com/2007/06/java-needs-much-more-memory-than-native.html

      What do u guys feel about its content? Feel free to post your opinions either as comments or as forum replies.

      I'm interested in understanding the reason why Java progs use more RAM and how it can be solved.
        • 1. Re: Opinion on Java's performance
          800282
          My only comment is that is against Sun's Terms of Use (which you agreed upon when registering here) to post links to your own (blog) site in order to increase traffic.
          Abuse reported.
          • 2. Re: Opinion on Java's performance
            807605
            I think if you're worrying so much about performance purely in terms of how much memory the platform is using, you don't really understand "performance", or much about how a system is built
            • 3. Re: Opinion on Java's performance
              800448
              I'm extremely sorry, prometheuzz. This was not an attempt to increase traffic. In fact, I was just lazy to type out the whole thing again in the forum.
              • 4. Re: Opinion on Java's performance
                800448
                Also, I understand that performance is not just about the memory usage. But, if Java platform is going to be used by more commonly on desktops, it just means that the users would need more RAM.

                Can't the runtime be redesigned in such a way that not all runtime classes are loaded before the actual program is run. I mean, can't the necessary classes be loaded dynamically.

                In fact many smaller programs don't use many of the classes available in the complete runtime.

                This is just my idea and I might be wrong, if so please correct me.
                • 5. Re: Opinion on Java's performance
                  EJP
                  Can't the runtime be redesigned in such a way that
                  not all runtime classes are loaded before the actual
                  program is run. I mean, can't the necessary classes
                  be loaded dynamically.
                  That is exactly how it has been working for over ten years.
                  This is just my idea and I might be wrong, if so
                  please correct me.
                  You are.

                  'Opinions' and 'ideas' about performance are not interesting. Not even slightly. What are interesting are measurements and observations about performance, and then strategies for improvements based on those observations and measurements. Did you make any?
                  • 6. Re: Opinion on Java's performance
                    800448
                    http://java.sun.com/developer/technicalArticles/javase/consumerjre/

                    At this link, Sun has put the following words,

                    For example, a recent version of Java SE 6 sports an rt.jar file of over 40 MB alone. If you add in the various other JAR files, native libraries, and resource files that get touched at startup, regardless of any application-specific code, that's a lot of data that has to be read in.


                    From that, I understood that rt.jar gets read fully even if the application doesn't need all those classes for running.
                    • 7. Re: Opinion on Java's performance
                      jwenting
                      http://java.sun.com/developer/technicalArticles/javase
                      /consumerjre/

                      At this link, Sun has put the following words,

                      For example, a recent version of Java SE 6 sports
                      an rt.jar file of over 40 MB alone. If you add in the
                      various other JAR files, native libraries, and
                      resource files that get touched at startup,
                      regardless of any application-specific code, that's a
                      lot of data that has to be read in.


                      From that, I understood that rt.jar gets read fully
                      even if the application doesn't need all those
                      classes for running.
                      no. It doesn't all get read. Or if it does most of it doesn't stay in memory unless needed.

                      If you have a 1000 page book, do you think it's too thick because you need to browse through the index to find the page you need?
                      • 8. Re: Opinion on Java's performance
                        800448
                        That was a nice explanation. So I understand that the extra memory usage of Java progs is purely due to the JVM itself.

                        I hope something gets done to reduce the startup time of Java desktop apps. I think the consumer JRE project is trying to do something. I hope it succeeds and helps in accelerating the acceptance of Java as a desktop platform.