That's the question I've asked myself for years... In the first versions of Java that was a concern: Why did Netbeans use 200MB of RAM when Visual Basic used just 10MB or less? PC's were more limited in RAM, maybe that's why Java was not popular in desktop apps, but succeeded with web servers, where you could afford a server with more RAM and disk drive. We had a joke at the office: "Java was slow and used huge amounts of RAM, however, now PC's have faster processors and lots of RAM!" :) These days it is not uncommon to see Netbeans using 1.5GB of RAM, yes it uses caches, precompiling, error detection, popup documentation and many more features but it still does not make sense. I don't know if somebody has an answer to this question but I guess it is related to performance and GC: If you have a considerable amount of RAM reserved, it's much faster to allocate new objects. Java is very efficient at Object allocation, in the same way, garbage collection is so fast that you don't even notice when it is running, so I would say: Java uses lots of RAM because performance is more important. Finally, I remember many years ago when a coworker went to a JBoss training course, and he asked the instructor: Why do Java and JBoss have to use such amounts of RAM? The instructor made a small pause and then he said (rephrasing at today's economy): How much is a developer salary? 20-30 dollars an hour? And, how much is a 16 GB stick of RAM? 16 dollars? Well, just buy more RAM for your developers and let them focus on solving business problems...
On Wed, Apr 10, 2024 at 3:32 AM Tom <mac...@t-online.de> wrote: > Why does Java and Netbeans use extreme amounts of RAM for simple apps? > Can there be done something about it? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org > For additional commands, e-mail: users-h...@netbeans.apache.org > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > >