Summary: | Scanner allocates new ArrayList(10) everytime it's created | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Adam Kiezun <akiezun> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.0 | ||
Target Milestone: | 2.1 M4 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Adam Kiezun
2002-11-22 13:41:04 EST
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. |