Community
Participate
Working Groups
Scanner creates a new instance of ArrayList of size 10 everytime a new Scanner is created, regardless of checkNonExternalizedStringLiterals is true or false after 10 seconds of typing in the editor, that sums up to almost 3MB of 'Object[]'
This is easy to fix. Simply need to replace: lines.add(currentLine); with: if (lines == null) { lines = new ArrayList(); } lines.add(currentLine);
All JDT Core tests are green with such a change. I can release it upon request.
You might want to reuse the scanner has much as possible anyway. setSource(...) and resetTo(...) methods are for this purpose. A scanner is not a small object and it should be used carefully.
Why not simply deleting the slot, it does no longer seem used anymore...
Removed slot, fixed.
thanks, that was a big one - like 600K every time you open a new editor
Verified.