[YANGTOOLS-701] ANTLR-generated code uses memory-inefficient lists Created: 25/Oct/16 Updated: 10/Apr/22 Resolved: 08/Nov/16 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Highest |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Epic Link: | Parser Performance |
| External issue ID: | 7025 |
| Description |
|
Examination of a heap dump has shown that the ANTLR-generated code uses default-sized ArrayLists to store child nodes. This is quite inefficient where we typically have small number of children. Since we have to parse the listener tree multiple times, and need the memory for our real state, we need to make sure we squash these lists to their minimum required memory. |
| Comments |
| Comment by Robert Varga [ 25/Oct/16 ] |
| Comment by Robert Varga [ 26/Oct/16 ] |