Quantcast

Maximum PC

It is currently Wed Nov 26, 2014 5:54 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 37 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: (sun) Java and memory management.
PostPosted: Thu May 05, 2005 10:51 am 
Smithfield
Smithfield
User avatar

Joined: Sun Sep 05, 2004 9:01 am
Posts: 8091
Somebody needs to sit these two down and get their shit in order. I've always been suspicious of a programing language the requires an executable to run... when I hear about java now being just as fast as C++ I still shake my head in disbelief.

Anywho Both FireFox and Azureus (especially the latest version) seem to have trouble with this, and have had for quite some time. They get larger and larger in memory until you minimize, then magically the problem goes away. Anyone who considers this anything less than a minor inconvenience is a shit head. If you ever meet them, punch them for me.

This problem is especially pronounced with the latest Sun Java revision (1.5.03). Sun sits on their keisters for some months doing whatever it is they do and finally release an update... only to have it worse than the previous. >_<

Anyone else a bit miffed at all this?


Top
  Profile  
 
 Post subject:
PostPosted: Thu May 05, 2005 10:55 am 
Clawhammer
Clawhammer
User avatar

Joined: Sat Jun 26, 2004 2:16 pm
Posts: 3600
The java thing with firefox only keeps going till about 120MB and I have a gig of ram so it isn't a big deal.


Top
  Profile  
 
 Post subject:
PostPosted: Thu May 05, 2005 11:06 am 
Smithfield
Smithfield
User avatar

Joined: Sun Sep 05, 2004 9:01 am
Posts: 8091
Till it also starts applying the problem to the page file, which it has done for Azureus in the past.

This is not something you should dismiss so easily. I want my gig as free as possible for other things.


Top
  Profile  
 
 Post subject:
PostPosted: Thu May 05, 2005 4:17 pm 
Team Member Top 100
Team Member Top 100

Joined: Fri Sep 17, 2004 5:35 pm
Posts: 1176
http://maximumpc.com/forum/viewtopic.ph ... 9&start=20

Glad I am not the only one.


Top
  Profile  
 
 Post subject:
PostPosted: Thu May 05, 2005 6:10 pm 
In the lab!
In the lab!
User avatar

Joined: Sun Jun 06, 2004 10:47 am
Posts: 831
Location: Secret Laboratory
sure it's fast as c++... it sucks up all the memory and cpu resoruces so that your other programs run just as slow as java does.

If it can't beat true compiled apps in a head to head race they'll just pull a nancy kerigan and wack them in the kneecaps to slow them down :)


Top
  Profile  
 
 Post subject:
PostPosted: Fri May 06, 2005 9:20 am 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Thu Jul 22, 2004 11:11 am
Posts: 5108
Location: RFC 1149 - Pidgeon Network
Depends on what it's doing. If you're calling routines that are highly optimized, then you're pretty ok. If you're creating you're own complex routines, then prepare for a sick waste of memory. One of the arguments in a programming reliability class i took that was for java, was that people dont have to worry about freeing memory allocated or worry about pointers and such (in 1.1, it wasn't that you could depend on java to free memory, its that you could not and it was retarded, so why worry about it?). The argument for C\C++ most of us tossed back was you're making programmers that wont be able to adapt to lower level languages which are more prevalent and would simply last longer than the java fad.

Java has gotten better, but keep in mind that .net is running in the same fashion, and a lot of software may be heading that way (bytecode).

The most annoying thing for me is their naming convention 1.5 = 5.0, etc.


Top
  Profile  
 
 Post subject: Re: (sun) Java and memory management.
PostPosted: Fri May 06, 2005 6:40 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
urmumsacow wrote:
Somebody needs to sit these two down and get their shit in order. I've always been suspicious of a programing language the requires an executable to run... when I hear about java now being just as fast as C++ I still shake my head in disbelief.

Listen up kiddo. Back in the day programmers use to say "compiled languages like C will never be faster than MY assembly". That day past. Not even Hennesey and Patterson are able to write assembly code that is faster than optimized code produced my a modern compiler (and it took them something like 40x longer to write the assembly code).

Some people still say "a language like Java or C#, which uses a JIT compiler, will never be faster than a language like C, C++ or Fortran." And guess what, that day is upon us. Java and C# are faster than C++, C and Fortran on under certain benchmarks and compare favorably (usually w/in 5 to 20 percent) on most others. What you're suspicious of, believe, don't believe, etc is not important - it won't discourage a single researcher, change a single benchmark, or have any impact on anyone that matters.

urmumsacow wrote:
This problem is especially pronounced with the latest Sun Java revision (1.5.03). Sun sits on their keisters for some months doing whatever it is they do and finally release an update... only to have it worse than the previous. >_<

Fine - profile the app under 1.5 and 1.4.2 w/ JFluid and show us the results.

Of course, if what you're saying is true (and it is bullshit), this means that all applications should exhibit the same behaviour. I keep NetBeans and JBuilder, both of which are Java applications, open for weeks at a time on my workstation. I've never had a problem w/ the jvm on any of the servers at work sucking up substantial memory (except when under heavy load of course).

Can't Azureus just be a poorly written application?


Top
  Profile  
 
 Post subject:
PostPosted: Fri May 06, 2005 6:40 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
_alex911 wrote:
The java thing with firefox only keeps going till about 120MB and I have a gig of ram so it isn't a big deal.

What Java thing w/ Firefox?


Top
  Profile  
 
 Post subject:
PostPosted: Fri May 06, 2005 6:45 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
Dexter wrote:
sure it's fast as c++... it sucks up all the memory and cpu resoruces so that your other programs run just as slow as java does.

If it can't beat true compiled apps in a head to head race they'll just pull a nancy kerigan and wack them in the kneecaps to slow them down :)

Give it a break Dex, you should know better. Do I really need to flood w/ 50+ ACM, IEEE, and other journal articles showing otherwise?

Did all the BASIC programming finally do what Dijkstra said it would?


Top
  Profile  
 
 Post subject:
PostPosted: Fri May 06, 2005 6:57 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
Beomagi wrote:
Depends on what it's doing. If you're calling routines that are highly optimized, then you're pretty ok. If you're creating you're own complex routines, then prepare for a sick waste of memory.

Let's see an example.

Beomagi wrote:
One of the arguments in a programming reliability class i took that was for java, was that people dont have to worry about freeing memory allocated or worry about pointers and such (in 1.1, it wasn't that you could depend on java to free memory, its that you could not and it was retarded, so why worry about it?).

Garbage collection has certainly got much better since the 1.1 days.

Beomagi wrote:
The argument for C\C++ most of us tossed back was you're making programmers that wont be able to adapt to lower level languages which are more prevalent and would simply last longer than the java fad.

I'm not sure what that meant, but Java is very capable of invoking routines written in C and C++.

I'll assume the "Java fad" comment was a joke.

Beomagi wrote:
The most annoying thing for me is their naming convention 1.5 = 5.0, etc.

The 1.5 Java/JVM specification maps to Java 5 (the platform/framework), not Java 5.0. Mostly, it is just marketing and a little easier for regular people to keep up with. The last time the Java platform version changed was Java 1 to Java 2 for the 1.2 specification - 3 or 4 years ago now. I'm not sure if 1.6 is going to result in a Java 6.


Top
  Profile  
 
 Post subject:
PostPosted: Fri May 06, 2005 6:59 pm 
Smithfield
Smithfield
User avatar

Joined: Sun Sep 05, 2004 9:01 am
Posts: 8091
Use FF for awhile, leave it open and observe its memory usage in task manager, minimize and be amazed.

Ive been using Azureus in Java from 1.4 through its current revision and its always been terrible for me and everyone ive talked too. It could very well be that azureus needs help, but then it could also be that the apps you use simply dont use the parts of java that need to be fixed.

Of course its alot more likely that an open source app with 6 full time developers and millions of users would have such a glaring problem for over a year. Then again all you have to do is install Java 1.5.2, run azureus and observe the memory usage, then uninstall Java and install 1.5.3 and you'll notice differences just like everyone else.


Top
  Profile  
 
 Post subject:
PostPosted: Fri May 06, 2005 8:30 pm 
Team Member Top 100
Team Member Top 100

Joined: Fri Sep 17, 2004 5:35 pm
Posts: 1176
Firefox is written in C++.

The problem is that it has to store allllllll the images and text representations.


Top
  Profile  
 
 Post subject:
PostPosted: Fri May 06, 2005 8:39 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
urmumsacow wrote:
Use FF for awhile, leave it open and observe its memory usage in task manager, minimize and be amazed.

Umm, and this may surprise you, but FireFox is written in C++.

No soup for you. Next!

urmumsacow wrote:
Ive been using Azureus in Java from 1.4 through its current revision and its always been terrible for me and everyone ive talked too. It could very well be that azureus needs help, but then it could also be that the apps you use simply dont use the parts of java that need to be fixed.

This is a possiblity that I suggested to Kybo in the other thread - Azureus uses SWT (the graphics lib). The only other app that I've used that uses SWT also performed poorly, but that was understandable considering that both Eclipse and SWT were very new at the time. Of course, you said that couldn't possibly be the problem in that thread. I have no idea how you came to that conclusion though.

urmumsacow wrote:
Of course its alot more likely that an open source app with 6 full time developers and millions of users would have such a glaring problem for over a year.

First, Java is open source now. OSI approved.

Second, was that sarcasm? =) Ok, maybe you're right - let's check the math. I suppose it is really possible that those six devs (LMAO, thanks I need that) and the couple million kids and other non-technical people using Azureus really do have their shit together better than the several 100 developers at Sun working on Java, many of whom have been awarded phd's for their work on Java, programming languages, compilers, computer architecture and other related areas of computer science - and the 4 million+ Java developers which have written billions, if not trillions of lines of code for over 1.5 billion Java enabled devices, millions of pc's, and on and on and on.

I suppose Honduras could attack the United States and win. Sarcasm is fun. =)

Third, don't believe the RMS/ESR hype - there are tons of OSS failures. You just don't hear much when 6 kids in a garage fail miserably trying to create another mp3 player, ftp client, whatever versus say 100 devs at a small company working on missle targeting software that goes out of business. As in the commercial software world, successful OSS applications are the exception, not the norm.

urmumsacow wrote:
Then again all you have to do is install Java 1.5.2, run azureus and observe the memory usage, then uninstall Java and install 1.5.3 and you'll notice differences just like everyone else.

No thanks - I tried it w/ 1.4.2 and it sucked up a lot of memory back then.

Seriously, you can use JFluid to profile Azureus and pinpoint the problems. Any jvm that has implemented the JFluid interface is able to hook into and profile any Java application - no recompilation is necessary. You can also start and stop profiling at any time which allows you to even profile running production applications. Oh my goodness, are those two huge advantedges that Java has over C/C++ or even the very unwonderful BASIC? Why, yes.

Whatcha think about that DEX? Sorry guys, couldn't resist. :)

If I find an excuse next week (reads, at least two or three weeks from now), I'll see if I can get my boss to let me profile some of our applications and I'll squeeze in some time in for Az.


Top
  Profile  
 
 Post subject:
PostPosted: Fri May 06, 2005 8:54 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
Kybo_Ren wrote:
Firefox is written in C++.

The problem is that it has to store allllllll the images and text representations.

I don't even know what to say now that I am laughing so hard.

It is obviously an issue with the C++ compiler thingie. I just don't trust single pass compilers. Do you?

It is that stinkin STL - vectors are evil! They should have used clibs instead.

Well, it may be the graphics library. You know how wasteful those artist types are. I bet they were stoned as hell when they made the widgets.

Come on guys - it is the OOP. Everything is allocated dynamically and only deallocated on holidays or something.

No, it's not that. It is the new operator. Malloc used way less memory.

I think it is the templates because you have to allocate at least 128 bits for everything because how else could you put a short in the same ADT as a long or double double or struct even?

Oh, I bet you never imagined having to save C++ from the non-programming hordes, did you. =)

And for the record, that was all bullshit. FF does not use obscene amounts of memory.


Top
  Profile  
 
 Post subject:
PostPosted: Sat May 07, 2005 11:07 am 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
Gadget wrote:
Kybo_Ren wrote:
Firefox is written in C++.

The problem is that it has to store allllllll the images and text representations.

I don't even know what to say now that I am laughing so hard.

It is obviously an issue with the C++ compiler thingie. I just don't trust single pass compilers. Do you?

It is that stinkin STL - vectors are evil! They should have used clibs instead.

Well, it may be the graphics library. You know how wasteful those artist types are. I bet they were stoned as hell when they made the widgets.

Come on guys - it is the OOP. Everything is allocated dynamically and only deallocated on holidays or something.

No, it's not that. It is the new operator. Malloc used way less memory.

I think it is the templates because you have to allocate at least 128 bits for everything because how else could you put a short in the same ADT as a long or double double or struct even?

Oh, I bet you never imagined having to save C++ from the non-programming hordes, did you. =)

And for the record, that was all bullshit. FF does not use obscene amounts of memory.



OH.MY.GOD....that's some sarcasm right there!!!


Top
  Profile  
 
 Post subject:
PostPosted: Sat May 07, 2005 11:36 am 
Smithfield
Smithfield
User avatar

Joined: Sun Sep 05, 2004 9:01 am
Posts: 8091
Woah... who said Firefox was Java? Not me, I was just pissed off at it.

Image

Here is an example of FireFox's bad memory use... thats 1 page. 1 pretty damn small page not even full loaded. In IE it takes about 20 MB fully loaded if that.


Top
  Profile  
 
 Post subject:
PostPosted: Sun May 08, 2005 6:21 pm 
I'd rather be modding!
I'd rather be modding!
User avatar

Joined: Fri Jun 25, 2004 3:47 pm
Posts: 3731
Location: Las Vegas
The latest FF is buggy.

Not sure what happened. Its a hog and its not as stable for me. Half the time when I quit, it stays resident as a process and won't let me reopen with out hard killing it. SOmetimes it appears to lose its cache and what not and shortly hang.

Not sure if you seen what I call the minimized shuffle yet - the minimized windows flip back and fourth for a bit.

I'm hoping it was a hasty release and the next will fix this. I already have page file issues for other reasons - I don't need more - and that means I need to stay lean. I have it at 58MB right now.

You can't really expect it to be as small as IE I don't think. But 60 seems a bit heavy. And it acts wierd - when I close non-FF windows it actually goes UP!! Whats up with that?

Anyways - its not bad enough to change yet. Interesting to know if Mozzila has this issue.

Manta


Top
  Profile  
 
 Post subject:
PostPosted: Mon May 09, 2005 10:07 am 
Smithfield
Smithfield
User avatar

Joined: Sun Sep 05, 2004 9:01 am
Posts: 8091
I've had most of those issues with firefox myself even before 1.0.3


Top
  Profile  
 
 Post subject:
PostPosted: Mon May 09, 2005 12:37 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
DJSPIN80 wrote:
OH.MY.GOD....that's some sarcasm right there!!!

Why thank you...

guess where I went this past weekend. =)


Top
  Profile  
 
 Post subject:
PostPosted: Mon May 09, 2005 12:46 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
urmumsacow wrote:
Woah... who said Firefox was Java?

Well, obviously a few of us thought you were confused about this since you started a thread about Sun's JVM having issues pertaining to memory usage then list it as an example of an application that sucks up too much memory.

What did you expect?

urmumsacow wrote:
Here is an example of FireFox's bad memory use... thats 1 page. 1 pretty damn small page not even full loaded. In IE it takes about 20 MB fully loaded if that.

The reason IE appears to use less memory is because the libraries are being loaded elsewhere - this is an old and well known trick that MS used against Netscape. This is partially the reason why the browser was integrated into the operating system. They could hide just how much memory IE was sucking up.

If you had a tool that was able to examine the total memory usage of an application, and not just the one IE process, you would probably conclude that IE is bloatware.

Microsoft has how many 1000's of products - how many of them are not bloatware?

Office... nope
Windows... nope
SQL2000... nope
Visual Studio... nope
...


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© 2014 Future US, Inc. All rights reserved.