posted 21 years ago
Hi,
I am maintaining a UPS application which was developed in java.The developer had used 4 packages which include around 60-70 classes.It has an inbuilt webserver,also uses SNMP,serial,Modem communication for the UPS monitoring.There are many threads running in the application simultaneously,there are many global,static structures,swing components used to show a tree structure of the upses connected.every ups has an static object associated with it which occupies 8000 bytes.Like wise when the number of upses configured reaches 110 or more the application gives outof memory errors.Also restructuring the application is a costly affair,time consuming and we cannot spend so much time as it is already in the market.we have approached the problem in the following ways
1) Trying to identify the variables which have not been initialized back to null after use.
2) See what logics can be changed,optimized.
3) To include only those classes which are used , instead the whole package.
4) Trying to see the possibility where we can change the static methods to non static methods.
5) Changing the data type of all intergers who are constant to byte so that they occupy lesser memory.
still the problem remains the same.is there any other strategy available to effectively tackle this problem.can i get some help on this.