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 / April 2006

Tip: Looking for answers? Try searching our database.

Performance issue: jar vs. bin/classes

Thread view: 
77Scorpio - 17 Apr 2006 09:56 GMT
I was wondering whether there is a performance difference between java
appications packed into jar files and java applications which are
spread as .class files
Brzezi - 17 Apr 2006 12:48 GMT
pon, 17 kwi 2006 o 10:56 GMT, 77Scorpio napisał(a):

> I was wondering whether there is a performance difference between java
> appications packed into jar files and java applications which are
> spread as .class files

what do u mean by "performance"?

starting program of course will be a little bit slower, coz jar it`s zip,
but files can be storede without compression, IMHO you can pass over this
problem

during runnig of program, there is no difference...

Pozdrawiam
    Brzezi
Signature

[    E-mail: brzezi@enter.net.pl ][   brzezi:~# uptime                        ]
[       Ekg: #3781111            ][    13:49:41 up 15 days, 20:18,  1 user,   ]
[ LinuxUser: #249916             ][    load average: 0.63, 0.80, 0.93         ]

Martin Gregorie - 17 Apr 2006 12:49 GMT
> I was wondering whether there is a performance difference between java
> appications packed into jar files and java applications which are
> spread as .class files

Compressed or uncompressed JAR files?

JAR files will reduce i/o overheads (only one file to open, less to read
if compressed).

A compressed JAR file will add to CPU loading (cycles used to decompress
 classes)

Whether using a JAR file increases performance or not depends on both
i/o performance and CPU speed. If the application loaded over the 'net
(i.e. is an applet) then using a JAR file is usually recommended.

Signature

martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

Brzezi - 17 Apr 2006 13:17 GMT
pon, 17 kwi 2006 o 13:49 GMT, Martin Gregorie napisał(a):

> JAR files will reduce i/o overheads (only one file to open, less to read
> if compressed).

but even loading not compressed jar makes overheads, because loader must
interpret jar(zip) file, but that overheads are so small, so it can be omitted

Pozdrawiam
    Brzezi
Signature

[    E-mail: brzezi@enter.net.pl ][  GEEK CODE [Version: 3.12]: GCM dpu s+:-  ]
[       Ekg: #3781111            ][  a--- C+++ UL++ P+ L+++ E--- W+++ N+++    ]
[ LinuxUser: #249916             ][  o-- K- w--- O-- M- V- PS PE Y PGP--- t+  ]
                                 [  5- X++ R* tv+ b- DI- D+ G+ e- h! r y--   ]

Martin Gregorie - 17 Apr 2006 18:47 GMT
> pon, 17 kwi 2006 o 13:49 GMT, Martin Gregorie napisał(a):
>
[quoted text clipped - 3 lines]
> but even loading not compressed jar makes overheads, because loader must
> interpret jar(zip) file, but that overheads are so small, so it can be omitted

Depends on your hardware and software. Both must be considered:

- If your CPU is fast but you're using an OS with slow i/o
  (e.g. Windows 9x) the JAR file most likely be faster.

- If your CPU is slow (<300 MHz) but your OS has fast, multi-threaded
  i/o (e.g Linux) the chances are that using a JAR file is slower.

- If you're reading the classes over a comms line then the JAR file
  will almost always be faster.

Signature

martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

Roedy Green - 17 Apr 2006 19:42 GMT
>I was wondering whether there is a performance difference between java
>appications packed into jar files and java applications which are
>spread as .class files
jars are more compact for transmission.  Class files don't need to be
decompressed.  

Usually the jars are the way to go. Class files are just too messy and
hard to control.  With a jar you know exactly what classes are being
used.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



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



©2008 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.