Closed DavidAccola closed 2 years ago
@DavidAccola For now this is tide to the memory allocated for the application. You can change that in the olv batch/shell file. There is an option for setting the max memory allocated to the java process which looks like this:
set MEMORY=-Xmx4096m
The default value is -Xmx1024m and with that value I was able to reproduce your problem. Once I changed that to the value in the example above, I was able to paste the full log. I don't think there is anything documented regarding on how much data we should be able to handle in the "Paste clipboard" functionality, but I have 2 possible solutions:
The pro is that we can handle it the same way than any other log file, though I tried loading the 80Mb file that I created into OLV and it also slapped me with an OutOfMemoryError, which means that we are loading the whole file into memory when we are parsing it, and that also need to be improved.
So at a minimum I see 1 bug:
If we do decide to change the implementation so that we can handle the message in a more performant way, the fix above would not apply anymore since we would not be running out of memory, but there would be other changes in the application that we would need to make:
We can also break this into 2 fixes
thoughts anyone?
It is really a bad implementation of Java Clipboard. I catch the OutOfMemory and display a error message with the hint to change the memory settings. I think this will be work in most cases because the Clipbord Method will after leave release the memory.
Just a quick note, the word "to" is repeated in the error message, in case you haven't caught it yet. It should be "too big to parse".
How large of a clipboard copy/paste can OtrosLogViewer reasonably be expected to handle?
java.lang.OutOfMemoryError: Java heap space
This is pasting what amounts to a 84 mb log file.