So I am actually seeking for suggested list of causes that may cause my java program to get slower overtime.
My java program keeps reading lines (line by line) from files and then for each line it applies the same set of calculation over it. However the issue as mentioned earlier is that it performance gets slower over time.
Now the drop in performance is not linear meaning that it does not keep slowing down every second. The performance (The speed of reading mainly) drops all at once. After applying a certain function that takes action periodically (Every couple of minutes or so).
Now the first thing that should jump to your mind that this function is doing some of the most obvious actions for performance reduction like
1- Creating large number of objects that stays in memory
a) Number of object is minimized
b) Each object reference is set to null when not needed to allow the GC (Garbage Collector) to perform well
c) I checked on task manager an it shows that memory usage is normal (Because of what I have done)
d) I check the heap usage on visalVM also and the usage of the heap was normal and low.
2- I am reading a large number of files, so not closing the files might be the reason
a) I made sure that all the opened files are closed after reading them.
I tried to figure out if any of the computer resources are enormously consumed over time, however using the task manager and the VisalVM 1.3.8 I couldn't find any.
Besides the fact the GC is behaving normally, where there are no trash in memory that might be affecting the performance and needs to be removed.
So do you have any suggestion of what cause that issue.