[YANGTOOLS-693] Parser: duplicate TypeStatementImpl objects Created: 18/Oct/16 Updated: 05/Apr/23 Resolved: 21/Oct/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 |
||
| Issue Links: |
|
||||||||
| Epic Link: | Parser Performance | ||||||||
| External issue ID: | 6965 | ||||||||
| Description |
|
Analysis of a memory snapshot with vendor models shows we end up with a SchemaContext which weighs about 240MB. Further analysis of duplicate objects shows we have ~12000 instances of TypeStatementImpl wasting ~2MB, which refer to simple yang types: Pre-allocate instances for all YANG basic types (e.g. not decimal64 and similar) and make sure to squash these duplicates to singleton instances. |
| Comments |
| Comment by Robert Varga [ 20/Oct/16 ] |
| Comment by Robert Varga [ 21/Oct/16 ] |