Re: RAM usage

2024-04-10 Thread Thomas Wolf
I've been writing Java applications since around 1995 and I have written many 
sizable ones that didn't require a huge amount of RAM.  Of course the JVM 
itself is a fixed overhead which is now, what, 50MB? (but even that can be 
ameliorated via modularization these days), and more and more third-party 
libraries and frameworks are in use, all of which add to an application's 
footprint.  And then there's the skill of the developer, lack of emphasis on 
design and testing, etc.  When applications had a life span of years or even 
decades, the cost of design, testing, performance tuning, etc. was worth it.  
Nowadays, there's much more of an emphasis of speed-to-market and the resulting 
software quality and performance reflects that.  But that's a general 
observation that doesn't just hold for Java applications - today's web apps in 
whatever language they're written are pretty slow and humongous in their RAM 
requirements.  But folks don't often complain about their Google Chrome or 
Safari browsers reaching giga-bytes in size?!

Back in the late 90's, when Netbeans first came out, it was a *lot* smaller.  
But back then, life was simple.  There was no groovy, maven, ivy, built-in web 
servers, support for web apps and frameworks, other programming languages, 
terminals, to-do lists, different IDE look & feels,...the list is endless - and 
it all adds up.

Also, Java app processes reserve memory via various JVM arguments (-Xms, -Xmx, 
etc.)  I don't know what Netbeans sets those parameters to these days, but you 
can adjust them yourself in the netbeans.conf file.  And Netbeans may not 
actually be using as much memory as you see the process take up - but once a 
Java process claims operating system memory (e.g. it needed a lot of RAM for a 
particular, but temporary operation), it doesn't give it back (at least that's 
how it used to be).

In sum, I think blaming Java for Java applications' large memory consumption is 
misguided.  If you could write the sort of applications written in Java in 
other languages (and it's not at all clear you could, given the huge Java 
ecosystem of ready-made third-party components/functionality), and in the time 
allowed to write those applications, they'd probably use just as much RAM.  
(yes, I do understand that what I just wrote may not hold in specific 
application domains, but I'm making a cross-domain point).

Just my $.02.
Tom



> On Apr 10, 2024, at 12:18 PM, Raul Cosio  wrote:
> 
> 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  > 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
>> 



Re: RAM usage

2024-04-10 Thread Raul Cosio
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  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
>
>


Re: RAM usage

2024-04-10 Thread Alonso Del Arte
Can you give an example of this using "extreme amounts of RAM for simple
apps"? We're talking something more involved than HelloWorld, but not
quite  toy-examples/src/viewers/MandelbrotJuliaViewer.java at main ·
Alonso-del-Arte/toy-examples · GitHub
,
right?
That one doesn't give me any problems if I don't zoom in too far.

Al

On Wed, Apr 10, 2024 at 5:33 AM Tom  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
>
>


Re: Formatting help: try-with-resource multiple variables

2024-04-10 Thread Pieter van den Hombergh
look for the linebreak settings in options editor formatting.

met vriendelijke groet
Pieter van den Hombergh

Op wo 10 apr 2024 11:19 schreef Francesco Chicchiriccò :

> Hi there,
> possibly a silly question: how can I convince Netbeans 21 to format like
> as following:
>
>  try (InputStream propStream =
> getClass().getResourceAsStream("/test.properties");
>  InputStream srcStream = new
> FileInputStream(props.getProperty("test.csv.src"));
>  FileOutputStream dstStream = new
> FileOutputStream(props.getProperty("test.csv.dst"))) {
>
> e.g. one variable per line, while it keeps rearranging as:
>
>  try (InputStream propStream =
> getClass().getResourceAsStream("/test.properties"); InputStream srcStream =
>  new FileInputStream(props.getProperty("test.csv.src"));
> FileOutputStream dstStream =
>  new FileOutputStream(props.getProperty("test.csv.dst"))) {
>
> ?
>
> TIA
> Regards.
>
> --
> Francesco Chicchiriccò
>
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
>
> Member at The Apache Software Foundation
> Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
> http://home.apache.org/~ilgrosso/
>
>
> -
> 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
>
>


RE: Formatting help: try-with-resource multiple variables

2024-04-10 Thread Francesco Chicchiriccò
Thank you, it worked!

FTR I had to save and restart Netbeans, a simple "Apply" did not actually 
change the formatting.

Regards.

On 2024/04/10 11:45:23 zephy...@gmail.com wrote:
> I tried to send an image but it failed.
> 
> The configuration is at: Tools -> Options -> Editor -> Formatting
> 
> Set the Language to "Java" and Category to "Wrapping"
> 
> To set one variable per line set the "Try Resources" option to "Always"
> 
> 
> On 2024/04/10 09:17:16 Francesco Chicchiriccò wrote:
> > Hi there,
> > possibly a silly question: how can I convince Netbeans 21 to format like as 
> > following:
> > 
> >  try (InputStream propStream = 
> > getClass().getResourceAsStream("/test.properties");
> >  InputStream srcStream = new 
> > FileInputStream(props.getProperty("test.csv.src"));
> >  FileOutputStream dstStream = new 
> > FileOutputStream(props.getProperty("test.csv.dst"))) {
> > 
> > e.g. one variable per line, while it keeps rearranging as:
> > 
> >  try (InputStream propStream = 
> > getClass().getResourceAsStream("/test.properties"); InputStream srcStream =
> >  new FileInputStream(props.getProperty("test.csv.src")); 
> > FileOutputStream dstStream =
> >  new FileOutputStream(props.getProperty("test.csv.dst"))) {
> > 
> > ?
> > 
> > TIA
> > Regards.
> > 
> > -- 
> > Francesco Chicchiriccò
> > 
> > Tirasa - Open Source Excellence
> > http://www.tirasa.net/
> > 
> > Member at The Apache Software Foundation
> > Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
> > http://home.apache.org/~ilgrosso/
> > 
> > 
> > -
> > 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
> > 
> > 
> 
> -- 
> Sent with Vivaldi Mail. Download Vivaldi for free at vivaldi.com
> 
> -
> 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
> 
> 

-
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



RE: Formatting help: try-with-resource multiple variables

2024-04-10 Thread zephyrgr
I tried to send an image but it failed.

The configuration is at: Tools -> Options -> Editor -> Formatting

Set the Language to "Java" and Category to "Wrapping"

To set one variable per line set the "Try Resources" option to "Always"


On 2024/04/10 09:17:16 Francesco Chicchiriccò wrote:
> Hi there,
> possibly a silly question: how can I convince Netbeans 21 to format like as 
> following:
> 
>  try (InputStream propStream = 
> getClass().getResourceAsStream("/test.properties");
>  InputStream srcStream = new 
> FileInputStream(props.getProperty("test.csv.src"));
>  FileOutputStream dstStream = new 
> FileOutputStream(props.getProperty("test.csv.dst"))) {
> 
> e.g. one variable per line, while it keeps rearranging as:
> 
>  try (InputStream propStream = 
> getClass().getResourceAsStream("/test.properties"); InputStream srcStream =
>  new FileInputStream(props.getProperty("test.csv.src")); 
> FileOutputStream dstStream =
>  new FileOutputStream(props.getProperty("test.csv.dst"))) {
> 
> ?
> 
> TIA
> Regards.
> 
> -- 
> Francesco Chicchiriccò
> 
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
> 
> Member at The Apache Software Foundation
> Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
> http://home.apache.org/~ilgrosso/
> 
> 
> -
> 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
> 
> 

-- 
Sent with Vivaldi Mail. Download Vivaldi for free at vivaldi.com

-
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



[Editor] Upgrade from 20 to 21 and open files

2024-04-10 Thread FF
Hi,

I have just upgraded from v20 to v21.

Settings where imported when opening for the first time, but the editor 
tabs I have open in v20 are not open in v21 (editor in plain empty).

I tried creating a "Document group" in v20, and the group is available 
in v21, but the editor opens empty again.

Any idea for starting v21 with the same open files as I have in v20?

Thanks in advance.

-- 
FF



-
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



RAM usage

2024-04-10 Thread Tom
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



Re: Can someone help me?

2024-04-10 Thread Alexander Kronenwett
You can use the community installer for MacOS aarch64. You will find the
link in the download section of the netbeans site.

Just use the latest version, it comes bundled with a jdk for netbeans to
run on.

Have fun with it!
Alex

Franco Fellicò  schrieb am Mi., 10. Apr. 2024, 11:10:

> I have been programming in Java for many years on Windows and Apple
> machines (with Intel processors). I would like to buy a new Apple
> machine (with M3 processor) but only if I can use Apache Netbeans with
> Java. I read that JDK 8 FOR ARM is now available and I would like to
> know if there is also an Apache Netbeans compatible with Apple's M3
> processor.
> If the answer is positive I would like to know which version of Netbeans
> is suitable and possibly the link to the page from which I can download
> it. Thenk you from Franco Fellico'in Rome
>
> --
> Ci sono due cose infinite: l'universo e la stupidità umana,
> ma riguardo l'universo ho ancora dei dubbi.
> [Albert Einstein]
>
>
> -
> 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
>
>


Formatting help: try-with-resource multiple variables

2024-04-10 Thread Francesco Chicchiriccò

Hi there,
possibly a silly question: how can I convince Netbeans 21 to format like as 
following:

    try (InputStream propStream = 
getClass().getResourceAsStream("/test.properties");
    InputStream srcStream = new 
FileInputStream(props.getProperty("test.csv.src"));
    FileOutputStream dstStream = new 
FileOutputStream(props.getProperty("test.csv.dst"))) {

e.g. one variable per line, while it keeps rearranging as:

    try (InputStream propStream = 
getClass().getResourceAsStream("/test.properties"); InputStream srcStream =
    new FileInputStream(props.getProperty("test.csv.src")); 
FileOutputStream dstStream =
    new FileOutputStream(props.getProperty("test.csv.dst"))) {

?

TIA
Regards.

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/


-
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



Can someone help me?

2024-04-10 Thread Franco Fellicò
I have been programming in Java for many years on Windows and Apple 
machines (with Intel processors). I would like to buy a new Apple 
machine (with M3 processor) but only if I can use Apache Netbeans with 
Java. I read that JDK 8 FOR ARM is now available and I would like to 
know if there is also an Apache Netbeans compatible with Apple's M3 
processor.
If the answer is positive I would like to know which version of Netbeans 
is suitable and possibly the link to the page from which I can download 
it. Thenk you from Franco Fellico'in Rome


--
Ci sono due cose infinite: l'universo e la stupidità umana,
ma riguardo l'universo ho ancora dei dubbi.
[Albert Einstein]


-
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