• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

reducing memory footprint in task manager

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi-

i just added another feature to my java program at
http://www.3rdshiftcoder.com

i thought about putting it out there for download
to get a little feedback but there is one issue
that i think i should address first.

in the windows task manager it takes 72,000k worth
of resources.

i noticed squirrel sql only takes about 40,234k.

if i go through all my .java source files and eliminate
as many java.util.* and actually use something like
java.util.ArrayList (more specific) instead will this
help lower the amount of resources my program consumes?

the project has lots of external jars in it. i tried
to only add jars i really needed.

also i might add that i kind of wanted to find a java
centric download site because it is hard to compete
on downloads when other finance (budget) software requires
no jre and is only a 1.5mb download.

do you know any java download sites for general use
programs?

thanks for helping,
jim
 
jim mcnamara
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi-

there is one other item of possible interest.
squirrel sql and my checkbook program have
a different process name.

one uses java.exe and one uses javaw.exe.

not sure if that helps explain any difference.

thanks again,
jim
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

if i go through all my .java source files and eliminate
as many java.util.* and actually use something like
java.util.ArrayList (more specific) instead will this
help lower the amount of resources my program consumes?



Not really. The import statement is for the compiler, it won't make the resultant program shorter, or consume less memory.

the project has lots of external jars in it. i tried
to only add jars i really needed.



Well, you should only have the jar files that you need in the classpath, but prior to Java 6, this should not have any effect on your program memory usage.

Starting from Java 6, a jar file in the classpath can run a piece of init code, but it is highly unlikely that you have such a jar file.

one uses java.exe and one uses javaw.exe.

not sure if that helps explain any difference.



I believe that the only difference is that javaw doesn't have a console.

Henry
 
jim mcnamara
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Henry.

i did many searches and finally came up with the same.
this just confirms it.

http://forum.java.sun.com/thread.jspa?threadID=753621&messageID=4306087

the link above says the same thing that Henry just confirmed
on import statements. i found this after Henry's post.

i guess for now i will give up on the memory issue.
maybe some day i will run into a java expert that can look
over my program and see if there is an easy way to reduce
some of the size of the java.exe or javaw.exe process when
the program loads. i will just be honest and advertise it
as a bit heavy on memory consumption.

thanks for helping,
jim
 
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic