Recommended: Sing it, brah! 5 fabulous songs for developers
JW's Top 5
Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Page 2 of 7
If the program is located on a disk drive local to the target platform, loading time of larger programs is rarely of concern. If, however, the program is located on a Web site on the Internet or a corporate intranet, executable size may become the limiting factor in the performance of a program. Over the Internet or intranet, Java programs and resources are, in general, much smaller and faster to load than native applications. There are two main contributors to this size difference: executable size and selective loading.
Windows NT executables that are written in C++ are significantly larger than similar Java executables. There are three contributing factors that account for this size difference.
First, the binary executable format for C++ programs can inflate code by as much as a factor of two over Java code.
Second, Java provides a series of well-defined consistent libraries, such as mathematics, various network services, collection classes, and graphics classes. The Java virtual machines (JVMs) contain these libraries. In contrast, C++ defines application programming interfaces (APIs) that allow developers to access many of these functions in a consistent manner. Unfortunately, if a developer wants to use any special functions outside the core C++ API, he must deliver the implementation of the supporting libraries with his program. The inclusion of these libraries can double or even treble the size of delivered code.
Finally, Java contains special libraries that support images and sound files in compressed formats, such as Joint Photographic
Expert Group (JPEG) and Graphics Interchange Format (GIF) for images, and Adaptive
-law encoded (AU) for audio. In contrast, the only natively supported formats in Windows NT are uncompressed: bitmap (BMP)
for images and wave (WAV) for audio. Compression can reduce the size of images by an order of magnitude and audio files by
a factor of three. Additional class libraries are available if you want to add support for other graphics and sound formats.
C++ program loaders must generally load the entire executable file before execution begins.
There are two ways to link DLLs in Win32: statically and dynamically. Statically linked DLLs (by far the most common) are loaded before the program is executed. Dynamically linked DLLs are loaded upon request but are rarely used because the syntax for loading the DLLs and accessing the contained library functions requires a large programming effort in Win32.
In addition, there is no run-time type checking for dynamically linked DLLs. This means that there is no way to tell if a DLL has changed except via a program crash. Finally, if the program is on a remote drive, the DLL must still be brought onto the local machine before it can be used. Establishing an automatic method for doing this in Win32 will require extensive programming on the part of the developer.
In contrast, the Java Loader can selectively load classes in a properly designed program as they are needed. For example, consider a full-featured word processor with such features as a thesaurus, a spell checker, mail merge, and export. These features typically produce multi-megabyte files.