Ensure that the prerequisites of applications you are packaging are correct. If you have additional prerequisites that you do not need, the packaged image will almost certainly contain unnecessary classes and methods. Checking prerequisites contains information on validating prerequisites.Because the packager includes all implementors of any referenced message, polymorphism means that methods that are unnecessary may sometimes be included. A good example of this problem is the class message initialize. This message is implemented and referenced in many places, and therefore it is likely that all implementors will be included in the packaged image. Most programmers, however, use the class method initialize only to perform initialization when the class is loaded into the image. This code is frequently unnecessary in the packaged image because it is not excecuted at runtime. To avoid this problem, you can rename such methods to initializeOnLoad. Then these methods will be left out of the packaged image.Also, you should ensure that initializeOnLoad is not referenced by any method which will be included in the packaged image. If it is referenced, not only will your method be included, but also those of all other classes in the development image.
|