Hi everyone!
I have written a server client that receives information, does a database transaction and then sends the result back to the client.
My client has requested that they be able to view what was received and what was sent in real time. I have used a JTextArea. The problem came in when I was doing some stress testing on the app. As soon as the number of requests hit about 150k, I noticed that it was using a lot of RAM. I wrote a method to clear the text area (setText(null) and tried setText("")). When the button was pressed that clears the textarea, it clears perfectly, but it was still using a ridiculous amount of RAM, and carried on growing straight away.
The 4 clients were told to send 100k requests each. Stress testing was just to see what would happen as a what if sort of thing.
Anyone have any idea how to use less memory with the JTextarea after it has cleared?
Any help would be appreciated!