Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2007

Tip: Looking for answers? Try searching our database.

Runtime.exec() is slow

Thread view: 
vol30w60 - 13 Jul 2007 17:38 GMT
Does anyone know why runtime.exec() would be slow in launching an
application. I am using the method given here:

http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=4

My application does launch, but it takes about 15 seconds before it is
able to accept input. Normally, it would only take a couple seconds to
start up from Windows.

I also tried Legend_Keeper's code found on this page, but there was no
change in start-up time:
http://forum.java.sun.com/thread.jspa?threadID=591948&messageID=3091096
Roedy Green - 13 Jul 2007 20:56 GMT
>My application does launch, but it takes about 15 seconds before it is
>able to accept input. Normally, it would only take a couple seconds to
>start up from Windows.

See if you can get your app to do something VERY early on in the load
process, like display a splash screen.

Some things that may be slowing it down:

1. RAM is already filled to the gills with the spawning Java app. That
all has to be paged out page by page to make room for the new app. See
what happens when you run this on a ram-rich machine.  See what you
can do to reduce your spawner's ram footprint prior to spawn.  In the
DOS days, I would have the spawner roll itself out to disk leaving
just a tiny stub in ram, spawn the child, then roll ram back in.  This
should happen as a side effect of the paging system today, but not as
efficiently since the page out happens gradually.

2. Perhaps the APP is waiting for something.  Is the spawner holding
on to a file?

3. Use a fully qualified *.exe name so there is no need to chase the
path.  Use  an explicit .exe.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.