Name: Anonymous 2011-09-26 22:06
So /prog/ I'm left to maintain a whole heap of java code. I probably should profile it because i've already spotted random memory leaks from time to time and bad performance hits.
Before i do any of that should i take the time to go through each file individually and slowly but painfully fix errors i can spot on the fly or should i just get out of a profiler and have it tell me where to look?
Also i've noticed this code makes heavy use of a vector class and all the vector operations stored per object create another vector object and sometimes there's a combination of 6 vector operations just to get the final request which means 6 new objects created/deallocated in that time. Would it be wise to redo this so that it doesn't allocate/deallocate tons and tons of temp objects which will only be used for another nanosecond then left for the GC each frame?
Before i do any of that should i take the time to go through each file individually and slowly but painfully fix errors i can spot on the fly or should i just get out of a profiler and have it tell me where to look?
Also i've noticed this code makes heavy use of a vector class and all the vector operations stored per object create another vector object and sometimes there's a combination of 6 vector operations just to get the final request which means 6 new objects created/deallocated in that time. Would it be wise to redo this so that it doesn't allocate/deallocate tons and tons of temp objects which will only be used for another nanosecond then left for the GC each frame?