[YANGTOOLS-252] Codecs: class overhead Created: 05/Aug/14 Updated: 10/Apr/22 Resolved: 07/Aug/14 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | ||
| 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: Linux |
||
| Description |
|
Analysis on a freshly-booted SP edition reveals that the javassist classpool accounts for 5.6M of memory with only 236 classes. There are, for example, 90 duplicate strings representing the serialize() method signature. This overhead will grow as the number of codecs is raised, so putting a cap on it is critical. Analyzing our new codecs, it seems we can eliminate a lot of that overhead by having a prototype class which we'll just create a copy of and set its serialize() method body. That should result in improved load times as well as better memory management. Note: the scope of this issue is org.opendaylight.yangtools.binding.data.codec.gen.impl.AbstractStreamWriterGenerator, not the previous generation of codecs. |
| Comments |
| Comment by Robert Varga [ 05/Aug/14 ] |
|
https://git.opendaylight.org/gerrit/9708 |